Page 1 of 1

[RESOLVED] navlink onclick with bulletproof

Posted: Wed Jun 25, 2008 11:39 am
by konus
Hello,
I am using happily the bulletproof template on my new blog http://www.dd4kids.de and would like to ask for help on the following problem:

In the theme options, I can enter he full URL of your link #X for the navbar.

Instead of using the classic link,

Code: Select all

<a href="http://www.dd4kids.de/uploads/ka-map.html">Karte</a>
I would like to open a iframe with the onclick-method. The link should be:

Code: Select all

<a href="#" onClick="document.getElementById('wrap').innerHTML='<iframe src=\'/uploads/ka-map.html\'></iframe>';">Karte</a>
If I enter

Code: Select all

"#" onclick...
into the theme options, it gets rendered to

Code: Select all

""#" onclick..."
What could I do to achieve the desired goal without messing up the theme?

Re: navlink onclick with bulletproof

Posted: Wed Jun 25, 2008 11:44 am
by garvinhicking
Hi!

Try to enter:

javascript:document.get....

into there. The template is not meant to deliver anything else than a HREF portion.

Regards,
Garvin

Posted: Wed Jun 25, 2008 12:36 pm
by konus
Thank you for your fast replay, but I had lo luck. I entered

Code: Select all

javascript:document.getElementById('wrap').innerHTML='<iframe width=\'99%\' height=\''+((window.innerHeight || document.body.offsetHeight)-225)+'\' src=\'/uploads/ka-map.html\'></iframe>';
and it rendered as

Code: Select all

<a href="javascript:document.getElementById('wrap').innerHTML='<iframe width=\'99%\' height=\''+((window.innerHeight || document.body.offsetHeight)-225)+'\' src=\'/uploads/ka-map.html\'></iframe>';" title="Karte">Karte</a>
The template is not meant to deliver anything else than a HREF portion.
What could I do about it? I am a beginner and it feels like like rocket science to me. :D

Posted: Wed Jun 25, 2008 1:34 pm
by garvinhicking
Hi!

If it renders like that, shouldn't it work? What happens when you click that link? You might want/need to outsource this function as a custom javascript function that you call instead, like <a href="javascript:makeIframe()">...</a>
What could I do about it? I am a beginner and it feels like like rocket science to me. :D
That's the problem -- if you want to add things like that, it even gets more rocket scientificer, because you'd need to patch up the whole template and create your own custom variant.

Regards,
Garvin

Posted: Wed Jun 25, 2008 2:03 pm
by konus
OK Problem can be closed.

I solved the problem by going a different approch. I took a static page and stuffed the Iframe inside it. So now I have a google map and still all navigation. :D

Thank you for helping anyway! :P