ondblClick Error

This is a discussion on "ondblClick Error" within the JavaScript Forum section. This forum, and the thread "ondblClick Error are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 28th, 2007, 11:39
Junior Member
Join Date: Dec 2006
Location: London
Age: 20
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
ondblClick Error

What it is, is i'm just messing around with Javascript at the moment, getting familiar with it, i add a <span> tag which has both a 'onClick' and 'ondblClick' within it. When you double click on the text, you should be sent to the direct image in another window/tab. However, although this works in FF, it just creates an error in IE7, any suggestions?

http://joeblogs.50webs.com/Templates/

Thanks!
Reply With Quote

  #2 (permalink)  
Old Apr 28th, 2007, 11:44
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,620
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: ondblClick Error

var newWindow = open ("/images/sd1.PNG","New Window");

should be...
var newWindow = window.open ("/images/sd1.PNG","New Window");
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #3 (permalink)  
Old Apr 28th, 2007, 11:48
Junior Member
Join Date: Dec 2006
Location: London
Age: 20
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Re: ondblClick Error

Tries*
Still seems to produce the same problem.
Reply With Quote
  #4 (permalink)  
Old Apr 28th, 2007, 13:02
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,620
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: ondblClick Error

The second parameter is the window ID. I don't think IE allows spaces in it.

try...
var newWindow = window.open ("/images/sd1.PNG","NewWindow");

Good reference:
http://www.javascript-coder.com/wind...dow-open.phtml
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #5 (permalink)  
Old Apr 28th, 2007, 13:03
Reputable Member
Join Date: Jul 2006
Location: Scotland
Age: 22
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to snow
Re: ondblClick Error

I believe it's because IE does not accept spaces in the new window's name...
Reply With Quote
  #6 (permalink)  
Old Apr 28th, 2007, 13:04
Reputable Member
Join Date: Jul 2006
Location: Scotland
Age: 22
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to snow
Re: ondblClick Error

People are just far too quick & helpful on this site
Reply With Quote
  #7 (permalink)  
Old Apr 28th, 2007, 13:07
Junior Member
Join Date: Dec 2006
Location: London
Age: 20
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Re: ondblClick Error

Ahhh, knew it was something stupid like that!
Hence my reason in 'not' using IE anymore!
Thanks for the help guys!
Reply With Quote
  #8 (permalink)  
Old Apr 28th, 2007, 16:43
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,620
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: ondblClick Error

LOL, You just beat me to it in the CMS thread.
Let's just call it a draw
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
Reply

Tags
error, ondblclick

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 ondblclick handlers to zoom-in/zoom-out images benreynolds4 JavaScript Forum 4 May 23rd, 2008 19:39
[SOLVED] Getting the &quot;Microsoft JET Database Engine error '80040e14'&quot; error. VegaLA Classic ASP 3 Jan 26th, 2008 00:12
Keep getting error message Microsoft VBScript runtime error '800a01a8' cpando1974 Classic ASP 2 Aug 7th, 2007 12:00
Error 500 - Internal server error JasonStanley PHP Forum 3 Apr 23rd, 2007 17:56


All times are GMT. The time now is 19:22.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43