Validation and onclick events.

For topics about current or future BETA releases, including feature requests.

Validation and onclick events.

Postby RSteinwand » Tue Jun 10, 2008 4:43 pm

This statement throws up several errors:
<a onmouseover="return hs()" href="javascript:" onclick="submitform()">Submit</a>

I get one for incomplete href and another for using both href and onclick. I guess I've always programmed that way since it wouldn't validate in the past. Using href="" throws another error so that's not an option.

Ideas?
User avatar
RSteinwand
Rank IV - Intermediate
Rank IV - Intermediate
 
Posts: 161
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND

Postby Albert Wiersch » Tue Jun 10, 2008 7:15 pm

If you want to use that construct the way it is (and not change it), then the best thing to do would probably be to just disable those validator messages by right-clicking on them in the editor and disabling them.

I haven't tested this but another option may be to change href="javascript:" to href="javascript:return" to eliminate one of the messages (the one that's an error).

I've made it (in the next BETA) so when you disable this message:
Incomplete "href" value "javascript:".

Then it won't disable the messages for other incomplete values... only for "javascript:", so you might want to wait for the next BETA to disable that message.

If you disable it now, then it will disable all messages of this type:
Incomplete "XXX" value "XXX".
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2361
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Postby RSteinwand » Wed Jun 11, 2008 8:06 am

I just test it and see what breaks. I was just picking your brain. :wink:
User avatar
RSteinwand
Rank IV - Intermediate
Rank IV - Intermediate
 
Posts: 161
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND


Return to CSE BETA Talk

Who is online

Users browsing this forum: No registered users and 1 guest