Web Design Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignWeb Design Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 30th, 2004, 05:59 PM
RageingNonsense RageingNonsense is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 7 RageingNonsense User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
HTML is showing up as text in certain parts of site

this is a weird problem. i have a php page that is echoing some HTML and javascript. there are several features on the page that work fine, except one. I have an image on the page, and when you click it it is supposed to open up a pop up with the larger version. for some reason when the page is first loaded, instead of making the proper link it displays half of the link tag as text above the image. everything else looks normal. when i refresh, the text goes away and the link works. it always requires a refresh though. i dont; udnerstand what is causeing this. let me show you my code, and an example of what happens....


here is the link code:

Quote:
<center>

<a href="javascript: cur_img = document.imageplace.src; imgwin = window.open('','','toolbar=0,status=0,location=0,directories=0'); imgwin.document.write('<body bgcolor=0D3159><a href=\'javascript: window.close();\' noborder><img src=\''+cur_img+'\' name=\'fullimage\'></a><script>window.resizeTo(fullimage.width+40,fullimage.height+80);</script></body>');" onmouseover="javascript: window.status='Click here to see full sized image'; return true;" onmouseout="javascript: window.status=''; return true;">

<img src="$config[listings_view_images_path]/$file_name" height="$height" width="$width" name="imageplace" align="middle" vspace="4">

</a>
</center>

keep in mind that this is being echoed in PHP. I stripped the \"
escape characters so its easier to read.



now, this is what i see on the first load...


Quote:
(top part of my page)

(some random link with no image to display)

');" onmouseover="javascript: window.status='Click here to see full sized image'; return true;" onmouseout="javascript: window.status=''; return true;">

(my image and the rest of the page)



on a refresh, the problem disapears. what is causeing this? i am totally stumped.

Reply With Quote
  #2  
Old October 1st, 2004, 03:35 AM
BonRouge's Avatar
BonRouge BonRouge is offline
Winemaster
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Sendai, Japan
Posts: 1,354 BonRouge User rank is Second Lieutenant (5000 - 10000 Reputation Level)BonRouge User rank is Second Lieutenant (5000 - 10000 Reputation Level)BonRouge User rank is Second Lieutenant (5000 - 10000 Reputation Level)BonRouge User rank is Second Lieutenant (5000 - 10000 Reputation Level)BonRouge User rank is Second Lieutenant (5000 - 10000 Reputation Level)BonRouge User rank is Second Lieutenant (5000 - 10000 Reputation Level)BonRouge User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Weeks 3 Days 2 h 52 m 6 sec
Reputation Power: 85
I could be wrong...

...in fact I probably am wrong, but I think you haven't closed your script. I think
Code:
....return true;">
should be
Code:
....return true;">')

Reply With Quote
  #3  
Old October 1st, 2004, 03:49 PM
RageingNonsense RageingNonsense is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 7 RageingNonsense User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
no its definitly not that because that part is actualy HTML. the hjavascript is fully embedded within the <A> tag

Reply With Quote
  #4  
Old October 2nd, 2004, 12:44 PM
BonRouge's Avatar
BonRouge BonRouge is offline
Winemaster
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Sendai, Japan
Posts: 1,354 BonRouge User rank is Second Lieutenant (5000 - 10000 Reputation Level)BonRouge User rank is Second Lieutenant (5000 - 10000 Reputation Level)BonRouge User rank is Second Lieutenant (5000 - 10000 Reputation Level)BonRouge User rank is Second Lieutenant (5000 - 10000 Reputation Level)BonRouge User rank is Second Lieutenant (5000 - 10000 Reputation Level)BonRouge User rank is Second Lieutenant (5000 - 10000 Reputation Level)BonRouge User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Weeks 3 Days 2 h 52 m 6 sec
Reputation Power: 85
OK. Looking again, I think it's around here :

onmouseout="javascript: window.status=''; return true;">

You seem to have too many inverted commas.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignWeb Design Help > HTML is showing up as text in certain parts of site


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway