Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Client Side Scripting
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 08-30-2003, 12:11 AM
  #1
RohitParik
Novice (Level 1)
 
RohitParik's Avatar
 
Join Date: Aug 2003
Posts: 3
iTrader: (0)
RohitParik is on a distinguished road
#null and javascript:void (0) ???

I am surprised at the following behaviour .. .Any explainations..
Use IE 5.0
Create a iframe which would display diff html pages.
Use the following code.

<html>
<head>
<script language="javascript">
function changeSrc(aI_gURL)
{
document.getElementById("myFrame").src=aI_gURL;
}
</script>
</head>
<body>
IFrame Example<br><br>
<form>
<a href="javascript:void(0);" onClick="changeSrc('test1.html');">Test1.html</a>
<a href="javascript:void(0);" onClick="changeSrc('test2.html');">Test2.html</a>
</form>
<iframe id="myFrame" name="testFrame" src="test1.html" widht="100" height="100"></iframe>
</body>
</html>

Nothing happens the page does not change

Use replace the href value to "#null"

voila... it works..
Why????
RohitParik is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 08-30-2003, 09:08 AM
  #2
Vincent Puglia
Paladin (Level 15)
 
Vincent Puglia's Avatar
 
Join Date: Jun 2000
Location: where the world once stood
Posts: 411
iTrader: (0)
Vincent Puglia is on a distinguished road
Hi,

Sorry, but all three works for me IE 6.0
Code:
<a href="#" 
<a href="#null" 
<a href="javascript:void(0)"
The only thing I can think of is that 'void' wasn't implemented in IE 5.0

Vinny
__________________
GrassBlade
Where the world once stood the blades of grass cut me still
Vincent Puglia is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-02-2003, 01:16 AM
  #3
RohitParik
Novice (Level 1)
 
RohitParik's Avatar
 
Join Date: Aug 2003
Posts: 3
iTrader: (0)
RohitParik is on a distinguished road
Hey Vince, u did not read the message properly...
I specifically mentioned IE 5.0 and not IE 6.0

RohitParik is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-02-2003, 07:43 AM
  #4
Vincent Puglia
Paladin (Level 15)
 
Vincent Puglia's Avatar
 
Join Date: Jun 2000
Location: where the world once stood
Posts: 411
iTrader: (0)
Vincent Puglia is on a distinguished road
Hi,

Nice to see I'm not the only one who needs new glasses
you said:
Quote:
.Any explainations..
I said:
Quote:
The only thing I can think of is that 'void' wasn't implemented in IE 5.0
you said:
Quote:
u did not read the message properly...
Pick the proper response:
1) Oh ye of little faith
2) Read the bottom line on the eye chart
3) Ye without sin cast the first stone
4) Sorry, no problem, my mistake
5) Stop, take a deep breath, think before answering

Vinny
__________________
GrassBlade
Where the world once stood the blades of grass cut me still
Vincent Puglia is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-02-2003, 09:20 AM
  #5
agent002
Resident Opera Guru
 
agent002's Avatar
 
Join Date: Feb 2003
Location: Suomi... SUOH-MIH
Posts: 6,454
iTrader: (0)
agent002 is on a distinguished road
void() is implemented in IE5.

Huh?

Can you test it one more time...?
__________________
° · o O oO
agent002 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-02-2003, 11:34 PM
  #6
RohitParik
Novice (Level 1)
 
RohitParik's Avatar
 
Join Date: Aug 2003
Posts: 3
iTrader: (0)
RohitParik is on a distinguished road
Hey Vince, spare the glasses, but i think void () was implemented, most of the other code i have works !
Cheers
RohitParik is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-03-2003, 08:31 AM
  #7
Vincent Puglia
Paladin (Level 15)
 
Vincent Puglia's Avatar
 
Join Date: Jun 2000
Location: where the world once stood
Posts: 411
iTrader: (0)
Vincent Puglia is on a distinguished road
Quote:
spare the glasses
Good thing, too. They broke yesterday -- now what's that phrase? "On a clear day I can see my nose?"

So what was the problem with IE 5 and void? Typo?

Actually, I never really believed IE 5.0 had any problems with void, since I am virtually certain I've been using it since version 4 -- but, what the hay, I no longer have a copy of 5, I couldn't test, and therefore....I came up with the only thing I could 'think of' -- implementation

Vinny
__________________
GrassBlade
Where the world once stood the blades of grass cut me still

Last edited by Vincent Puglia : 09-03-2003 at 08:33 AM.
Vincent Puglia is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-14-2003, 05:42 PM
  #8
okarman
Novice (Level 1)
 
okarman's Avatar
 
Join Date: Sep 2003
Posts: 1
iTrader: (0)
okarman is on a distinguished road
Wink

and there goes my message... I seem not to be able to delete it...

Well, nothing important anyway...

Last edited by okarman : 09-14-2003 at 05:48 PM.
okarman is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart



 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  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
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 01:49 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.