events in NS (onfocus, onblur)

This is a discussion on "events in NS (onfocus, onblur)" within the Web Page Design section. This forum, and the thread "events in NS (onfocus, onblur) are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 25th, 2004, 13:01
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
events in NS (onfocus, onblur)

I need your help again guys.....

I'm currently working on this checkout page (http://www.primeappliances.com/shop/checkout/index.asp) and it works beautifully in IE so far.

But surprisingly I'm having problems with NS (!)
(WHY DOES THAT STUPID THING EVEN EXIST?????)

Anyway, if you guys have a look and kinda fill in the form, you'll see that events are triggered when you enter and leave the fields and that's how the validation takes place.
obviously I'll re-check everything before submission but that's the general idea anyway.....

HOWEVER, it will not work in NS. I've researched on the subject of cross-browser scripting and I even implemented this wicked cross-browser library from cross-browser.com (v. good site btw).

but anyway, everything works, aparts form the small details that the my validation functions don't even get called in NS.

does anyone know a way to work around that?

OH YEAH!
while I'm at it, I might as well ask this:
how do you get this to work in netscape:
<DIV style="100%">hello</DIV>
I want it to fill the whole line and I've tried nesting the <DIV>'s in <LAYER>'s and everything with no luck....

By the way,
I'm NOT responsible for
http://www.primeappliances.com/
I'm designing the new site
http://www.primeappliances.com/prime/
and if you guys have any comments on the site itself, go for it!
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)

  #2 (permalink)  
Old Apr 25th, 2004, 22:03
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
I don't know much about Javascript, but do know that IE and NS have very different document structures, which affects the way objects are detected within the code.
If you are referencing objects within your code with an ID, then try to use GetObjectbyID([blah]) rather than referencing the object name directly.
  #3 (permalink)  
Old Apr 26th, 2004, 13:13
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
thanks for your reply....

I have thought of that already and that is exactly what I'm doing....
The script itself works fine in both IE and NS.

the problem I'm having is that I want the script to be called automatically when the user enters and leaves the field.
i.e.:
Code: Select all
<INPUT TYPE=text NAME=myinput ONFOCUS="EnterField(this);" ONBLUR="LeaveField(this);">
that works in IE but not in NS. Nor does "onclick" and "onmouseover".

so i'd be really interested if anyone knows a way to detect those events in NS....
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
  #4 (permalink)  
Old Apr 26th, 2004, 17:57
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Again, I'm guessing, but try this:
Code: Select all
<input type="text" name="myinput id="myinput" onfocus="javascript:EnterField(this);return false;" onblur="javascript:LeaveField(this);return false;">
(Try not to get into the nasty habit of using UPPERCASE tagnames/attributes. Don't forget those quotes ( " ) too)
  #5 (permalink)  
Old Apr 26th, 2004, 22:45
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
I tried but no luck,
I might just ignore NS users. they simply won't have access to the facility but everything else works fine.....

<blockquote id="quote"><font size="1" face="geneva, verdana, arial" id="quote">quote:<hr height="1" noshade id="quote">(Try not to get into the nasty habit of using UPPERCASE tagnames/attributes. Don't forget those quotes ( " ) too)<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
nasty? I thought that was a good habit!
DAMN! I've always coded like that coz I thought it looked neat!
is it just a convension not to use uppercase or does it have a special reason?
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
  #6 (permalink)  
Old Apr 27th, 2004, 08:11
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
lowercase tags/attributes and quoted attributes are required for XHTML, which is the next step-up from HTML.
  #7 (permalink)  
Old Apr 27th, 2004, 16:32
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
XHTML is just HTML but making sure that things are properly done, such as attribute values quoted etc...
Closed Thread

Tags
events, onfocus, onblur

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
help me plzz... onblur() hazrizal84 JavaScript Forum 1 Jun 12th, 2008 21:57
Script for Booking Events webassistant PHP Forum 3 Mar 13th, 2008 16:19
[SOLVED] Changing onfocus of a textbox djeyewater JavaScript Forum 5 Jan 5th, 2008 17:38
Recent Events JacobHaug Webforumz Cafe 0 Oct 8th, 2007 05:50
PHP Events Calendar with output to PDF EarlThorfinn PHP Forum 1 Jun 8th, 2006 02:43


All times are GMT. The time now is 17:52.


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