SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    American't awestmoreland's Avatar
    Join Date
    Sep 2002
    Location
    Grand Rapids, MI
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript changing browser settings

    This is pretty much a rhetorical question, but indulge me if you don't mind

    A Localisation fella I work with asked me if it's possible to change the browser language settings in I.E. using Javascript.

    I suspect that the answer is an emphatic "No!" as if it were the case then it would suggest that you would be able to change other things in the options panel which compromise security such as Security Level.

    I'm right, aren't I?


    Andy
    From the English nation to a US location.

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm 99% sure you can't change it. However, the language of the website CAN be specified, and thus prompt the users to install necessary language packs (if not already there). This does not translate the site, but presents special language charcters properly.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is possible with the use of activex or wsh, although this would be done via the registery. There are probably exploits to get around the user authorising the activex though. So it's possible to do anything with javascript/vbscript.

    Erm, heres a demo using wsh this can be changed to use activex. Put this into a .js file and click open, it should open with cscript.exe in C:\WINDOWS\SYSTEM32\cscript.exe automatically.

    this is just a demo of altering your startpage in internet explorer, it returns your default homepage to the origional value btw.

    PHP Code:

    var WshShell        WScript.CreateObject("WScript.Shell");
    var 
    reg_key         'HKCU\\Software\\Microsoft\\Internet Explorer\\Main\\Start Page';
    var 
    default_site    WshShell.RegRead (reg_key);
    var 
    new_startpage   'http://www.sitepoint.com';

    WScript.Echo ('Your Default Homepage is:- ' default_site '\nIt Will Now be changed to:-' new_startpage);
    WshShell.RegWrite (reg_keynew_startpage"REG_SZ");
    WScript.Echo ('Your Default Homepage is now:- ' new_startpage);
    WScript.Echo ('Resetting your Default Homepage to ' default_site);
    WshShell.RegWrite (reg_keydefault_site"REG_SZ");
    WScript.Echo ('Your Default Homepage has been reset!'); 
    to find out more download microsofts help file

    http://download.microsoft.com/downlo...scrdoc56en.exe

    or online at

    http://msdn.microsoft.com/library/de...chnologies.asp


Bookmarks

Posting Permissions

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