Shawn Olson Guestbook

Shawn Olson Guestbook

William Moraes said: [ Regarding Using an Object Id with JavaScript ]

hey man, fix up your button!
on the button event you should put this:

changeImgSize(document.exampleForm.Example.value,document.exampleForm.width.value,document.exampleForm.height.value); return false

you forgot the "return false". without this the page will send all data from the form to the action, and reload the page as well.

:) (sorry for my bad english)


Subscribe to this guestbook 

Shawn Olson said: [ See Comment Stimulus ]

William, thanks for the post. The function was something I put up years ago to demonstrate how to use an object's ID to manipulate it. The article really did not get to the point... but it did provide that function.

I expect to write something more useful in time. As for your comment about the button... the function being called was not intended to return anything. I assume you were having a problem with the function because you were using Firefox or another browser beyond IE. In IE, a button does not automatically submit a form... since the demonstration form was not originally intended to submit the form to a server script... and I originally did not test it in Firefox... I did not see the issue you brought to my attention.

I have updated the demo form to work properly in Firefox. Thanks for pointing out the issue.


Please note that not all of the ideas, opinions and statements made in this guestbook necessarily represent the views and opinions of Shawn Olson.

This guestook is kept spam-free by the protection of the GoodGuest System.

Featured Articles by Shawn Olson

sitemap RGB Color Columbus Photography Free Word Search Maker monty hall game Hangman John Dewey