Javascript 1.2

Posted by Community Admin on 03-Aug-2018 17:31

Javascript 1.2

All Replies

Posted by Community Admin on 10-Feb-2011 00:00

You are going to love this one :)

So, I tried adding some javascript to one of my pages using the script controls, which worked in the past. The one thing I noted with the scripts I was trying to add is that they are marked as JavaScript1.2.
When I added them to the page and published, I got nothing. The scripts were in the source, but they were not doing what they should have been.

Here is the JavaScript I am trying to add:

<script src="https://www.smartrego.com/express/smix_cookie_process.js" type="text/javascript" language="JavaScript1.2"></script>
<script src="https://www.smartrego.com/express/date.js" type="text/javascript" language="JavaScript1.2"></script>
 
<script language="JavaScript1.2">
function get_url_ax(name)
       
      name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 
      var regexS = "[\\?&]"+name+"=([^&#]*)"
      var regex = new RegExp( regexS ); 
      var results = regex.exec( window.location.href );  if( results == null )   
      return ""; else return results[1];
      
var default_ax_param = 'CDD5AAB334C5FFF38F5132F4F006B74A8E84F9532DA7F617CE1898CB4EFA6C98';   
var ax_param = get_url_ax('ax');
var dx_param = get_url_dx('dx');
if ((ax_param == null) || (ax_param =='')) ax_param = default_ax_param;
document.write('<iframe src="'+v_iframe_url+'register.cfm?ax='+ax_param+'&wxrc='+Get_Cookie('wx_random_cookie')+'&dx='+dx_param+'" width="300" height="350" frameborder="0" scrolling="no"><p>Your browser does not support iframes.</p></iframe>');
</script>  

Now, I decided because it wasn't working, to paste this into a General Content control. When I did this and pressed Save, the screen went white and it said "Done" in the status bar. So I naviated to the Admin area and saw that my page was locked, I clicked to edit it and as soon as I went into the editor I could see my javascript was working.
Great I thought, but then when I edited my General Content control, and viewed HTML it just had a line break and that was it! My script had dissappeared, but was working.

I am a little concerned that I may be breaking the system here, so I thought I would post it here and ask if there is a better way of adding these to the site?

Thanks,
Jaymie

Posted by Community Admin on 14-Feb-2011 00:00

Hi Jaymie,

Can you tell me what browser are you using and do you get any java script errors?
You can also try to use the java script widget and check if it works with it.

Best wishes,
Pavel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 14-Feb-2011 00:00

Firefox 3.6.13

I have tried the Widgets (I called them controls in my earlier post) but they do not work.
I don't get any errors from the scripts when I add them, it's just that I can't add them via the JS Widgets, they just don't work.
Doing my work around works, but to me it seems like a bug that might need fixing.

Posted by Community Admin on 17-Feb-2011 00:00

Hello Jaymie,

I have tried reproducing your issue using the JavaScript controls and was unable to. I have attached a video where I illustrate how your scripts are added to the page.

All the best,
Radoslav Georgiev
the Telerik team

Posted by Community Admin on 23-Nov-2011 00:00

Unsubscribing

This thread is closed