changing javascript variable using address bar

Discussion in 'Software' started by Unbanable, Nov 24, 2009.

  1. Unbanable

    Unbanable Specialist

    What I'm trying to do is change a javascript variable value in a website using the address bar. I've done this before, but can't seem to get it to work again. I can't remember how I did it. I know that it's worked before.

    Example, on the site www.thewebsiteisdown.com, in the unix section, if the variable LOGIN_USER is set to root, you will receive different feedback for certain 'commands'. I try to set the variable to root by entering "javascript:LOGIN_USER=root" (without the quotation marks) into the address bar but the feedback doesn't change, so apparently it isn't changing the variable.

    Like I said, I know that I've done this before, but can't remember the exact command that I used. Either something has changed that is preventing this from working, or I'm not entering it like I did before.

    Another example.. Some website block certain functions like highlighting text using javascript.. Being able to enter javascript in the address bar, one should be able to negate these javascript functions. I can't get entering the javascript in the address bar to work in these cases, either.
     
  2. Unbanable

    Unbanable Specialist

    Well, I suppose I figured it out... the following code works, at least in the first example.

    javascript: var LOGIN_USER='root'
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds