SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Addict rwar's Avatar
    Join Date
    Sep 2001
    Location
    PF / RS / BR
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    default homepage in Firefox

    I'm looking for a script (javascript) that, after the user clicks in a button, the page will be the default one. I found several scripts, but they only work in Internet Explorer and not in Firefox 1.0.4. Can someone help me please?
    php? mysql? apache? That's it.

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope - Firefox was built for people that aren't idiots.

  3. #3
    SitePoint Addict rwar's Avatar
    Join Date
    Sep 2001
    Location
    PF / RS / BR
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Buddy Bradley
    Nope - Firefox was built for people that aren't idiots.
    That's what I told to boss, but she does not believe in that...

    It someone else has the same point, please just tell me (and my boss )
    php? mysql? apache? That's it.

  4. #4
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    The set homepage thingy is an IE only extension to JavaScript. No one else supports it (thank goodness).

  5. #5
    SitePoint Member
    Join Date
    Nov 2004
    Location
    Subotica
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Buddy Bradley
    Nope - Firefox was built for people that aren't idiots.
    So, his boss is ...

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,815
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Javascript can only access the current web page and read a few things from the browser such as window size and screen resolution. Javascript is available in many popular browsers the biggest exception being Internet Explorer which provides JScript instead of Javascript.

    JScript has more access to both the browser and Operating System since it only runs on Internet Explorer which is integrated into the Windows Operating System and therefore allows such access. Of course any sensible person has their security settings set to disallow this access since a web page should not have access to anything outside of the page.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #7
    SitePoint Addict rwar's Avatar
    Join Date
    Sep 2001
    Location
    PF / RS / BR
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks to all of you. The problem is that, in the company I work for, all the computers have IE installed. I'm trying to change this idea, but it's a tough job.

    Just a doubt: if I'm emulating IE with Wine on some Linux distro, for example, can I have this funcionality?
    php? mysql? apache? That's it.

  8. #8
    Employed Again Viflux's Avatar
    Join Date
    May 2003
    Location
    London, On.
    Posts
    1,127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall
    Javascript is available in many popular browsers the biggest exception being Internet Explorer which provides JScript instead of Javascript.
    Recent incarnations (5+ to be sure) of Internet Explorer support Javascript as well.

  9. #9
    SitePoint Enthusiast pentapenguin's Avatar
    Join Date
    Aug 2005
    Location
    GA, USA
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rwar
    I'm looking for a script (javascript) that, after the user clicks in a button, the page will be the default one. I found several scripts, but they only work in Internet Explorer and not in Firefox 1.0.4. Can someone help me please?
    Just to confirm, Firefox doesn't support the set as homepage and add to favorites JavaScripts. Actually though it's a good thing because isn't annoying when you stumble across one of those horrid all ads, spam sites that try to install spyware and reset your homepage?

    Quote Originally Posted by rwar
    Just a doubt: if I'm emulating IE with Wine on some Linux distro, for example, can I have this funcionality?
    You should be able to do that since it's a IE thing and not OS dependent.

  10. #10
    SitePoint Addict rwar's Avatar
    Join Date
    Sep 2001
    Location
    PF / RS / BR
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pentapenguin
    Just to confirm, Firefox doesn't support the set as homepage and add to favorites JavaScripts. Actually though it's a good thing because isn't annoying when you stumble across one of those horrid all ads, spam sites that try to install spyware and reset your homepage?
    In that case, I agree with you. Not that I use it, but it's another funcionality to the browser. As FF has anti-popup, it would be nice to implement that. Don't you think?


    Quote Originally Posted by pentapenguin
    You should be able to do that since it's a IE thing and not OS dependent.
    After I asked I realized that's it. Thanks anyway.
    php? mysql? apache? That's it.

  11. #11
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,815
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Viflux
    Recent incarnations (5+ to be sure) of Internet Explorer support Javascript as well.
    No that is Microsoft JScript which is a Javascript lookalike that will process most Javascript code correctly but handles a few things differently as well as providing a number of extra commands not available in Javascript.

    For example:

    Javascript:

    var ajaxObj = new XMLHttpRequest();

    JScript:

    var ajaxObj = new ActiveXObject('Microsoft.XmlHttp');

    The biggest incompatibility problem is that JScript automatically maps a lot of fields to make it easier to access them so that if you have a Javascript variable and an id of the same name in your HTML. You can't have the same name for both with JScript because JScript will overwrite one with the other in the extra field mappings that it applies.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  12. #12
    Employed Again Viflux's Avatar
    Join Date
    May 2003
    Location
    London, On.
    Posts
    1,127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, you're wrong.

    The difference in the code stated above is that the 2nd one is using Javascript to create an ActiveX object, which is an IE specific feature. You'll want to note that the first snippet works in IE7's early betas, since they've finally decided to expose the XMLHTTPRequest object.

    Look at the MSDN page for JScript and tell me where all the common Javascript methods are. Also, the MSDN pages for IE will tell you that versions 5+ support Javascript.

  13. #13
    Employed Again Viflux's Avatar
    Join Date
    May 2003
    Location
    London, On.
    Posts
    1,127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's some info on the XMLHTTPRequest addition to IE7, from an IE team member's blog.

    http://blogs.msdn.com/ie/archive/2006/01/23/516393.aspx

  14. #14
    Employed Again Viflux's Avatar
    Join Date
    May 2003
    Location
    London, On.
    Posts
    1,127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After doing a very tiny amount of testing, it appears that I may have been incorrect, or at least a little off in my estimation.

    It seems that JScript specific calls (like the ScriptEngine() function) will work in Internet Explorer regardless of the language attribute in the script tag.

    I was correct, however, in my assumption that JScript is useful outside of an 'Internet Explorer Only' environment, as it can be used with the WSH (much like VBScript) to perform routing shell operations.

    Time be off to the office!


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
  •