[RESOLVED] navlink onclick with bulletproof

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
konus
Regular
Posts: 334
Joined: Mon Jun 16, 2008 1:57 pm
Location: Dresden, Germany
Contact:

[RESOLVED] navlink onclick with bulletproof

Post 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?
Last edited by konus on Thu Jun 26, 2008 10:10 am, edited 1 time in total.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: navlink onclick with bulletproof

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
konus
Regular
Posts: 334
Joined: Mon Jun 16, 2008 1:57 pm
Location: Dresden, Germany
Contact:

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
konus
Regular
Posts: 334
Joined: Mon Jun 16, 2008 1:57 pm
Location: Dresden, Germany
Contact:

Post 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
Post Reply