Web Design Forum  
 
Go Back   Web Design Forum > Web and Graphic Design > Web Design

Reply
 
LinkBack Thread Tools Display Modes
Old 07-02-2007, 09:34 PM   #1 (permalink)
New Member
 
Join Date: Jun 2007
Posts: 8
Default javascript

Why is it when i use more than one word in the textbox.value area it only displays the first word? e.g

<a href="gallery/Toyota_Corolla_1_5_Auto.jpg" onmouseover=document.form1.inf.value="Toyota" " " "Corolla" "2003"><img src="gallery/Toyota_Corolla_1_5_Auto.jpg" alt="Toyota Corolla 1.8ltr, Petrol, 1994 silver Automatic, Front Wheel Drive, Aircon, Front Loader &amp; DVD Player" width="128" height="96">

check it at www.oliva.co.za/cars.html
ihsaaan is offline   Reply With Quote
Old 07-03-2007, 09:24 PM   #2 (permalink)
New Member
 
Join Date: Jun 2007
Location: Birmingham, UK
Posts: 3
Default

Your event handlers look like

Code:
onmouseover=document.form1.inf.value="2003 Toyota Corolla Silver Automatic Full House"
onmouseout="document.form1.inf.value=" ""
The code of the event handler should always be enclosed in double qoutes, and the JavaScript strings need to be enclosed in single quotes. So the above example should read

Code:
onmouseover="document.form1.inf.value='2003 Toyota Corolla Silver Automatic Full House'"
onmouseout="document.form1.inf.value=' '"
That should work
__________________
Holger Schmitz -- Web Developer -- www.viventic.biz
hschmitz is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 04:31 AM.


Computer Forum - Internet Business - Webpage Design

 
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.