Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Entering javascript blocks into TextBox

Entering javascript blocks into TextBox

Scheduled Pinned Locked Moved ASP.NET
helpjavascriptsalescollaborationtools
3 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AndyBrew70
    wrote on last edited by
    #1

    Hi We have a backoffice system for an e-Commerce solution that allows the user to setup their own javascript blocks that can be added to the site for tracking purposes. Now when we click submit on the form to save the entry the page hangs, now I have created a test form and now know its not making it back to the Page_Load event of the form. The other weird thing is that every now and again everything works perfectly ok without issue and then just when you think you've narrowed the problem down it stops working again!! The page always renders immediately without problem, the issue only occurs on the post back. This seems to be very strange and I am at a loss as to the source of the problem, below is the script block I am using to test. Any ideas? _uacct = "[google.account]"; urchinTracker(); <!-- var strMsg = '[script.var.mode]'; var strSubTotal = '[script.var.order.value]'; if (strSubTotal == '') strSubTotal = "0"; if (strMsg == '') { //alert(typeof(ROIID) + '::::'); if (typeof(ROIID) + '' != 'undefined') { TrackEvent('LandingPage', 0); } } else { //alert(strMsg.substr(0,32)); if (strMsg.substr(0,32) == 'Thank you for placing your order') { //alert('order placed'); if (typeof(ROIID) + '' != 'undefined') { gt_cid="CustomerID"; TrackEvent('Sale', '[script.var.order.value]', '[script.var.order.no]'); } } else if (strMsg == 'Thank you for adding your email address to our mailing list.') { //alert('thankyou - newsletter signup'); //When a newsletter sign up has been completed if (typeof(ROIID) + '' != 'undefined') { TrackEvent('NewsConf', 0); } } else if (strMsg == 'Thank you for recommending one of our products to your friends.') { //alert('thankyou - email a friend'); //When an email to a friend has been completed if (typeof(ROIID) + '' != 'undefined') { TrackEvent('EmailConf', 0); } } else if (strMsg == 'Thank you, your comments have been forwarded to our customer care team and we will respond to you as soon as possible.') </x-turndown>

    A 2 Replies Last reply
    0
    • A AndyBrew70

      Hi We have a backoffice system for an e-Commerce solution that allows the user to setup their own javascript blocks that can be added to the site for tracking purposes. Now when we click submit on the form to save the entry the page hangs, now I have created a test form and now know its not making it back to the Page_Load event of the form. The other weird thing is that every now and again everything works perfectly ok without issue and then just when you think you've narrowed the problem down it stops working again!! The page always renders immediately without problem, the issue only occurs on the post back. This seems to be very strange and I am at a loss as to the source of the problem, below is the script block I am using to test. Any ideas? _uacct = "[google.account]"; urchinTracker(); <!-- var strMsg = '[script.var.mode]'; var strSubTotal = '[script.var.order.value]'; if (strSubTotal == '') strSubTotal = "0"; if (strMsg == '') { //alert(typeof(ROIID) + '::::'); if (typeof(ROIID) + '' != 'undefined') { TrackEvent('LandingPage', 0); } } else { //alert(strMsg.substr(0,32)); if (strMsg.substr(0,32) == 'Thank you for placing your order') { //alert('order placed'); if (typeof(ROIID) + '' != 'undefined') { gt_cid="CustomerID"; TrackEvent('Sale', '[script.var.order.value]', '[script.var.order.no]'); } } else if (strMsg == 'Thank you for adding your email address to our mailing list.') { //alert('thankyou - newsletter signup'); //When a newsletter sign up has been completed if (typeof(ROIID) + '' != 'undefined') { TrackEvent('NewsConf', 0); } } else if (strMsg == 'Thank you for recommending one of our products to your friends.') { //alert('thankyou - email a friend'); //When an email to a friend has been completed if (typeof(ROIID) + '' != 'undefined') { TrackEvent('EmailConf', 0); } } else if (strMsg == 'Thank you, your comments have been forwarded to our customer care team and we will respond to you as soon as possible.') </x-turndown>

      A Offline
      A Offline
      AndyBrew70
      wrote on last edited by
      #2

      Plot thickens LOL!!! if I enter this: - it hangs, take one of those lines off and it works!

      1 Reply Last reply
      0
      • A AndyBrew70

        Hi We have a backoffice system for an e-Commerce solution that allows the user to setup their own javascript blocks that can be added to the site for tracking purposes. Now when we click submit on the form to save the entry the page hangs, now I have created a test form and now know its not making it back to the Page_Load event of the form. The other weird thing is that every now and again everything works perfectly ok without issue and then just when you think you've narrowed the problem down it stops working again!! The page always renders immediately without problem, the issue only occurs on the post back. This seems to be very strange and I am at a loss as to the source of the problem, below is the script block I am using to test. Any ideas? _uacct = "[google.account]"; urchinTracker(); <!-- var strMsg = '[script.var.mode]'; var strSubTotal = '[script.var.order.value]'; if (strSubTotal == '') strSubTotal = "0"; if (strMsg == '') { //alert(typeof(ROIID) + '::::'); if (typeof(ROIID) + '' != 'undefined') { TrackEvent('LandingPage', 0); } } else { //alert(strMsg.substr(0,32)); if (strMsg.substr(0,32) == 'Thank you for placing your order') { //alert('order placed'); if (typeof(ROIID) + '' != 'undefined') { gt_cid="CustomerID"; TrackEvent('Sale', '[script.var.order.value]', '[script.var.order.no]'); } } else if (strMsg == 'Thank you for adding your email address to our mailing list.') { //alert('thankyou - newsletter signup'); //When a newsletter sign up has been completed if (typeof(ROIID) + '' != 'undefined') { TrackEvent('NewsConf', 0); } } else if (strMsg == 'Thank you for recommending one of our products to your friends.') { //alert('thankyou - email a friend'); //When an email to a friend has been completed if (typeof(ROIID) + '' != 'undefined') { TrackEvent('EmailConf', 0); } } else if (strMsg == 'Thank you, your comments have been forwarded to our customer care team and we will respond to you as soon as possible.') </x-turndown>

        A Offline
        A Offline
        AndyBrew70
        wrote on last edited by
        #3

        SOLUTION It transpires that the Network Switch has a Intrusion Protection facility that was determining the form to be a malicious attack and preventing its submission! :rolleyes:

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups