![]() |
|
|
How to display html in javascript without canceling out specific tags? |
|
Ultra Talker
Posts: 326
Name: Denny
Location: In a can...
|
I am using a javascript mouse over. The inner content displays html but I have to cancel out specific tags and ' with a \.
Does anyone have any suggestions how I could do an SSI through javascript that would allow me to include any HTML ? For instance: Instead of this mess: Code:
<img src="images/barn_2_draft.gif" alt="#" title="The Gable" width="115" height="86"
onmouseover=
"Tip('<div id=\'box_1\'><img src=images/Barns/barn_2.gif width=145 height=110 ><\/div><div id=\'box_2\'><strong>The Gable features <\/strong>a standard 6\' tall wall and an over sized top plate for additional overhang. With its classic styling this building offers a great balance between tall walls and a lower overall height.<br \/><br \/><br \/><\/div><div id=\'box_3\'><img src=images/Barns/barn_1.gif width=145 height=110 ><\/div><div id=\'box_4\'>The six foot sidewall building offers maximum storage on walls and overhead. This building is the most cubic foot building for the dollar. You can never go wrong with a tall sidewall barn. We also offer optional lofting and shelving to help maximize your space.<\/div>', HEIGHT, 125, WIDTH, 380, TITLE, 'The Gable', TITLEFONTSIZE, '13pt', FADEIN, 200, FADEOUT, 300, CLOSEBTN, true, STICKY, true)"
onmouseout="UnTip()" />
Code:
<img src="images/barn_2_draft.gif" alt="#" title="The Gable" width="115" height="86"
onmouseover=
"Tip('<?php include("includes\/1.htm"); ?>;', HEIGHT, 125, WIDTH, 380, TITLE, 'The Gable', TITLEFONTSIZE, '13pt', FADEIN, 200, FADEOUT, 300, CLOSEBTN, true, STICKY, true)"
onmouseout="UnTip()" />
__________________
Man... IE stinks ... and If I get one more contingency offer!!! **Sydpixel**
|
|
|
|
| Sponsored Links (We share ad revenue): |
|
|
Re: How to display html in javascript without canceling out specific tags? |
|
Super Moderator
![]() Posts: 10,598
Location: Blackpool. UK
|
Not using an include but this thread may help
http://www.webmaster-talk.com/html-f...tml#post295089 earlier in the thread are ASP and PHP functions to do the same kind of thing
__________________
Chris. ->> Links are advertising NOT optimising!! <<- Indifference will be the downfall of mankind, but who cares? Code Samples | People Counting System |
|
|
|
|
|
Re: How to display html in javascript without canceling out specific tags? |
|
Ultra Talker
Posts: 326
Name: Denny
Location: In a can...
|
Thanks for that Chris.
What I think I need is something like this http://us3.php.net/preg_replace I'm trying to cancel the need for the cancel if that makes any sense? I would like to use ANY html inside and php include. Is this possible without converting to php? With this, I can print php but I have to format html to print properly. Code:
<img src="images/barn_2_draft.gif" alt="#" title="The Gable" width="115" height="86"
onmouseover="Tip('<?php print("Can gophers really code PHP?");?>', HEIGHT, 125, WIDTH, 380, TITLE, 'The Gable', TITLEFONTSIZE, '13pt', FADEIN, 200, FADEOUT, 300, CLOSEBTN, true, STICKY, true)"
onmouseout="UnTip()" />
<--- I would like to put ANY html in here---> Code:
<img src="images/barn_2_draft.gif" alt="#" title="The Gable" width="115" height="86"
onmouseover="Tip('<?php print("<--- I would like to put ANY html in here--->");?>', HEIGHT, 125, WIDTH, 380, TITLE, 'The Gable', TITLEFONTSIZE, '13pt', FADEIN, 200, FADEOUT, 300, CLOSEBTN, true, STICKY, true)"
onmouseout="UnTip()" />
__________________
Man... IE stinks ... and If I get one more contingency offer!!! **Sydpixel**
Last edited by Sydpix : 04-27-2008 at 08:18 AM. |
|
|
|
| Sponsored Links (We share ad revenue): |
| Thread Tools | |
|
|
| Webmaster Resources Marketplace: |
| Software Development Company | Webhosting.UK.com |
| Web Templates | Text Link Brokers | Stock Photos |