Javascript alert syntax error - worked in 5.0.12

We just upgraded to 6.5.1 this weekend from 5.0.12 (finally!) and everything seemed to be fine. The only issue I’m having is one app that uses javascript alerts in hotspots as a sort of help text. I did not originally write these and do not know javascript, but they are all similar to:

javascript: alert(‘Linked Issues – Select any other change requests that are related to this change.’)

Now when I click on any hotspot with these javascript alerts, they all come up with:

A JavaScript Error was encountered

Error: Syntax error

I tried changing the parentheses to curly brackets and the single quotes to double quotes just trying to see if it was something simple but those didn’t help. Can anyone help me to fix these?

Thanks,

Jackie

Subject: javascript alert syntax error - worked in 5.0.12

Make sure you’re changing the right javascript code… R6 allows you to have JS for the Client, another JS for the Web or you can select Common JS, which is for both. Its caught me many times after changing JS and not seeing the expected results on the web. I find out I was changing the JS for the client only.

This may have nothing to do with your problem though.

Subject: RE: javascript alert syntax error - worked in 5.0.12

Floyd, How would I tell which javascript code it is? This code is just the value text in a hotspot with a type of URL. Is there some other place I go to set that? I checked the form on a browser and it still works fine - so it’s just in the client. That would seem to support your suggestion, I just don’t know how to change it.

Thanks,

Jackie

Subject: RE: javascript alert syntax error - worked in 5.0.12

The code area should have a drop-down to select the client (Web, Client, and sometimes Common JavaScript).

Subject: RE: javascript alert syntax error - worked in 5.0.12

I’m sorry, maybe I’m being really dense here. But I don’t have a code area. The area in question is just some text on the form that I put a hotspot on top of. Then I selected the properties for the hotspot resource link and in the popup box selected URL as the type and included the javascript shown earlier as the value in the little value box. Is there some other way to access this information? Or somewhere better to put the alert where I could access the client type?

Thanks,

Jackie

Subject: RE: javascript alert syntax error - worked in 5.0.12

Why did you pick Link Hotspot? Everyone and their dog was pretty much assuming that this would have been an Action Hotspot (which would have made more sense since there’s no link going on).

Subject: RE: javascript alert syntax error - worked in 5.0.12

…Well, that would do it! Like I said, I did not initially build this database and it didn’t occur to me to change it to an action hotspot. Thanks for your patience! :slight_smile:

Jackie