close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Javascript will not work on first visit

Thread began 12/22/2009 11:31 am by dcb286193 | Last modified 12/22/2009 2:55 pm by dcb286193 | 1915 views | 2 replies |

dcb286193

Javascript will not work on first visit

I have a form that calculates price according to items selected in drop down menus using Javascript. The very first time you visit the page it will not call the function to calculate. If you close the window then re-open it the calculation works just fine.

Hope someone can point me in the right direction as to why this is happening.

Sign in to reply to this post

Jimmy Wu

How was this Javascript created? Are you importing it from another file or is it inline? Make sure the import happens before the calculation if it is imported.

Unfortunately, since this code doesn't seem to be generated by any WebAssist products, it is not supported by us, but there may be users on the forum that can help you on this issue.

Sign in to reply to this post

dcb286193

The Javascript is created in-line.

You are correct it was not generated by any WebAssist product. I don't want to give anyone the wrong idea about the products produced by WebAssist. They are robust and very functional and if their is a issue they are here to support it and do a fine job at that.

I appreciate your response. I do however, seem to have an undefined index (new session variable) in the code which is defined after the Javascript code. So when you first enter the page it creates an error, then after canceling and re-entering the page since the index (session variable) was previously defined the error no longer exists.

Defining the index (session variable) prior to the Javascript codes seems to have solved the problem. Thanks

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...