Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Smile JavaScript question

    Hello. Sorry potentially about this question. On a computer I use..I can first go to the 'tools' command button...then scroll down to 'developer tools'. When I get there a particular screen shows up. It displays the javascript encoded on the the particular 'page' I am viewing. Is it possible to 'alter' the code that already exists for a page? I can not seem to alter what I am viewing at all.

    Can you create javascript by 'typing' in script when this screen is displayed? Or do you have to use 'notepad'?

    Thanks for any and all responses
    Bye
    SC
    Last edited by spacecadet11; 10-09-2012 at 10:59 PM. Reason: Spelling..and additions

  • #2
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,026
    Thanks
    36
    Thanked 494 Times in 488 Posts

    Lightbulb

    My assumption is that you are looking at the "View Source" screen display.

    You cannot modify this screen and re-execute the script.
    You can however copy the source, paste it to a new textfile with NotePad (or other text editor)
    save the modified code and then execute it from your browser's 'open file' command.

    That also assumes there are not any external files being accessed.
    If there are, they need to be copied as well if they are not referenced with a complete URL.

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,730
    Thanks
    202
    Thanked 2,508 Times in 2,486 Posts
    I think he means Developer Tools (F12 in IE).

    Is it possible to 'alter' the code that already exists for a page? No, no and no!

    He means (say) change price = 100 to price = 1 or something.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #4
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,762
    Thanks
    55
    Thanked 517 Times in 514 Posts
    in firefox's tools>web developer there is a javascript scratch pad where you can enter javascript and see what changes it makes to the page. It will only affect the local version of the page for the length of the browser session, though, of course.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •