Browser id script

I am trying to write a script that will identify which browser a user is using and direct them to a specific web page designed for their specific browser. Here is my script.
<HTML>
<HEAD>
<TITLE>JavaScript - Browser detect</TITLE>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
var detect = navigator.userAgent.toLowerCase();
var OS,browser,total,thestring;
var version = 0;
if (checkIt('konqueror'))
     browser = "Konqueror";
     OS = "Linux";
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
     browser = "Netscape Navigator"
     version = detect.charAt(8);
else browser = "An unknown browser";
if (!version) version = detect.charAt(place + thestring.length);
if (!OS)
     if (checkIt('linux')) OS = "Linux";
     else if (checkIt('x11')) OS = "Unix";
     else if (checkIt('mac')) OS = "Mac"
     else if (checkIt('win')) OS = "Windows"
     else OS = "an unknown operating system";
function checkIt(string)
     place = detect.indexOf(string) + 1;
     thestring = string;
     return place;
if(browser != "Microsoft Internet Explorer")
     window.location="http://www.myserver.com/abc/microsoft.html";
else if(browser != "Netscape")
     window.location="http://www.myserver.com/abc/netscape.html";
// -->
</SCRIPT>
</HEAD>
The problem is that the script automatically forwards to the first location and doesn't even seem to be reading the if statement. Basically if you visit the page with netscape you still get forwarded to the microsoft page. I am fairly new to this so any help would be greatly appreciated.
Thanks,
Matt

Here is my new revised script. I think I have fixed all the inconsistent strings and the IF statements. It still forwards netscape to the microsoft page. Any ideas?
<HTML>
<HEAD>
<TITLE>JavaScript - Browser detect</TITLE>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
var detect = navigator.userAgent.toLowerCase();
var OS,browser,total,thestring;
var version = 0;
if (checkIt('konqueror'))
     browser = "Konqueror";
     OS = "Linux";
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Microsoft Internet Explorer"
else if (!checkIt('compatible'))
     browser = "Netscape"
     version = detect.charAt(8);
else browser = "An unknown browser";
if (!version) version = detect.charAt(place + thestring.length);
if (!OS)
     if (checkIt('linux')) OS = "Linux";
     else if (checkIt('x11')) OS = "Unix";
     else if (checkIt('mac')) OS = "Mac"
     else if (checkIt('win')) OS = "Windows"
     else OS = "an unknown operating system";
function checkIt(string)
     place = detect.indexOf(string) + 1;
     thestring = string;
     return place;
if(browser = "Microsoft Internet Explorer")
     window.location="microsoft.html";
else if(browser = "Netscape")
     window.location="netscape.html";
// -->
</SCRIPT>
</HEAD>

Similar Messages

  • Re: DW8 and "browser-safe" scripts

    > the <object> tag doesn't usually cause a problem,
    I don't think, unless
    > that's what's making IE produce a "click to run
    > ActiveX" messagebox when a page with a Shockwave movie
    is loaded.
    It is.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Fred Riley" <[email protected]> wrote in
    message
    news:[email protected]...
    >>>> Murray
    *ACE*<[email protected]> 28/06/2006 12:07:27
    >>>
    > "Browser-safe", eh? ;-)
    >
    > Definitely. Are you talking shockwave or Flash? The
    former is for
    > Director
    > files, the latter is for errr Flash files.
    >
    > F: Shockwave.
    >
    > Anyhow, your two errors are -
    >
    > Line 2, syntax error.
    > Line 159, object expected.
    >
    > Fix the first by removing this line -
    >
    > <?xml version="1.0" encoding="iso-8859-1"?>
    >
    > F: Aaarrrgggh! Not that blasted line *again*. It's not
    me that puts it in
    > the page, honest, guv, it was blasted Dreamweaver MX
    2004.
    >
    > It's not needed, and furthermore, it hurts you by
    putting IE into quirks
    > mode. I'm not quite sure why it's throwing this js error
    though. <shrug>
    >
    > The second error is caused by your failure to upload the
    Scripts folder,
    > which contains the function called on line 159 -
    >
    > <script type="text/javascript">
    > AC_SW_RunContent( '
    >
    > F: Hmmm. I'd not noticed that folder appearing in my
    site. Ah well, it
    > rules out me using the 'browser-safe' scripts then, as
    I'd have to create
    > and upload a /Scripts folder for every learning object
    on my site, and
    > that's lots of them. They can't all use the same
    /Scripts as they're
    > supposed to be standalone and survive if packaged and
    moved outside the
    > site. No matter, the <object> tag doesn't usually
    cause a problem, I don't
    > think, unless that's what's making IE produce a "click
    to run ActiveX"
    > messagebox when a page with a Shockwave movie is loaded.
    >
    > Do those things and you'll see a difference.
    >
    > F: No, you're not wrong there, Murray. Maybe the script
    is "browser-safe"
    > after all. I still think I'll use the <object>
    tag, though, but look
    > closely at the W3C spec to make sure that I stay within
    standards. I'm
    > always a bit nervous about doing in Javascript what
    should be done in
    > HTML.
    >
    > Thanks anyhoo for the reply, which wasn't expected.
    >
    > Cheers
    >
    > Fred

    > the <object> tag doesn't usually cause a problem,
    I don't think, unless
    > that's what's making IE produce a "click to run
    > ActiveX" messagebox when a page with a Shockwave movie
    is loaded.
    It is.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Fred Riley" <[email protected]> wrote in
    message
    news:[email protected]...
    >>>> Murray
    *ACE*<[email protected]> 28/06/2006 12:07:27
    >>>
    > "Browser-safe", eh? ;-)
    >
    > Definitely. Are you talking shockwave or Flash? The
    former is for
    > Director
    > files, the latter is for errr Flash files.
    >
    > F: Shockwave.
    >
    > Anyhow, your two errors are -
    >
    > Line 2, syntax error.
    > Line 159, object expected.
    >
    > Fix the first by removing this line -
    >
    > <?xml version="1.0" encoding="iso-8859-1"?>
    >
    > F: Aaarrrgggh! Not that blasted line *again*. It's not
    me that puts it in
    > the page, honest, guv, it was blasted Dreamweaver MX
    2004.
    >
    > It's not needed, and furthermore, it hurts you by
    putting IE into quirks
    > mode. I'm not quite sure why it's throwing this js error
    though. <shrug>
    >
    > The second error is caused by your failure to upload the
    Scripts folder,
    > which contains the function called on line 159 -
    >
    > <script type="text/javascript">
    > AC_SW_RunContent( '
    >
    > F: Hmmm. I'd not noticed that folder appearing in my
    site. Ah well, it
    > rules out me using the 'browser-safe' scripts then, as
    I'd have to create
    > and upload a /Scripts folder for every learning object
    on my site, and
    > that's lots of them. They can't all use the same
    /Scripts as they're
    > supposed to be standalone and survive if packaged and
    moved outside the
    > site. No matter, the <object> tag doesn't usually
    cause a problem, I don't
    > think, unless that's what's making IE produce a "click
    to run ActiveX"
    > messagebox when a page with a Shockwave movie is loaded.
    >
    > Do those things and you'll see a difference.
    >
    > F: No, you're not wrong there, Murray. Maybe the script
    is "browser-safe"
    > after all. I still think I'll use the <object>
    tag, though, but look
    > closely at the W3C spec to make sure that I stay within
    standards. I'm
    > always a bit nervous about doing in Javascript what
    should be done in
    > HTML.
    >
    > Thanks anyhoo for the reply, which wasn't expected.
    >
    > Cheers
    >
    > Fred

  • DW8 and "browser-safe" scripts

    I don't know if this is a bug in DW8 or a local problem, and
    it's not really important either way, but I did want to get it off
    my chest. When I open a HTML page containing a Shockwave movie
    embedded with an <object> tag into DW8, I get the prompt that
    the <object> tag may not work properly with recent versions
    of IE, and do I want to use a browser-safe script instead? Out of
    curiousity I've given this a go and uploaded a test page, and
    amusingly the page now gives two runtime errors in IE6 which prompt
    you to run the Microsoft Debugger - see
    http://www.nottingham.ac.uk/nursing/sonet/test/dyslexia_test/2.html.
    No such problem in Mozilla 1.7, of course. This is probably caused
    by there being other Javascript scripts on the page, but it did
    make me chortle anyway. "Browser-safe", eh? ;-)
    I was hoping that the fix might kill the irritating but
    non-fatal IE prompt you sometimes get on pages with Shockwave
    movies, which prompts you to click Ok to run ActiveX content, but I
    think I'll live with that rather than runtime errors...
    Cheers
    Fred

    "Browser-safe", eh? ;-)
    Definitely. Are you talking shockwave or Flash? The former is
    for Director
    files, the latter is for errr Flash files.
    Anyhow, your two errors are -
    Line 2, syntax error.
    Line 159, object expected.
    Fix the first by removing this line -
    <?xml version="1.0" encoding="iso-8859-1"?>
    It's not needed, and furthermore, it hurts you by putting IE
    into quirks
    mode. I'm not quite sure why it's throwing this js error
    though. <shrug>
    The second error is caused by your failure to upload the
    Scripts folder,
    which contains the function called on line 159 -
    <script type="text/javascript">
    AC_SW_RunContent( '
    Do those things and you'll see a difference.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Fred Riley" <[email protected]> wrote in
    message
    news:[email protected]...
    >I don't know if this is a bug in DW8 or a local problem,
    and it's not
    >really important either way, but I did want to get it off
    my chest. When I
    >open a HTML page containing a Shockwave movie embedded
    with an <object> tag
    >into DW8, I get the prompt that the <object> tag
    may not work properly with
    >recent versions of IE, and do I want to use a
    browser-safe script instead?
    >Out of curiousity I've given this a go and uploaded a
    test page, and
    >amusingly the page now gives two runtime errors in IE6
    which prompt you to
    >run the Microsoft Debugger - see
    >
    http://www.nottingham.ac.uk/nursing/sonet/test/dyslexia_test/2.html.
    No
    >such problem in Mozilla 1.7, of course. This is probably
    caused by there
    >being other Javascript scripts on the page, but it did
    make me chortle
    >anyway. "Browser-safe", eh? ;-)
    >
    > I was hoping that the fix might kill the irritating but
    non-fatal IE
    > prompt you sometimes get on pages with Shockwave movies,
    which prompts you
    > to click Ok to run ActiveX content, but I think I'll
    live with that rather
    > than runtime errors...
    >
    > Cheers
    >
    > Fred

  • Browser detection script

    Hello,
    I'm wondering how playback in Flash or on older browsers work. Does the published content run a browser detection script?
    Thank you.

    Actually this seems to work better:
    if (accept.indexOf("vnd.wap.wml") >= 0) {
         // I have a WAP browser...
    }I thought Opera (being WML compatible) would load the WML content, but thankfully it does not broadcast it in the Accept header.
    Thanks.

  • Web browser and script activeX controls and HTML data

    Hello,
    I'm trying to use the Microsoft Web Browser (IWebBrowser2) and Script (IScriptControl) activeX controls in Labview to evaluate and execute HTML script.  If I wire the web browser control's document object to the object input of the Script control's AddObject method, I can then evaluate/execute script such as "document.f.btnI.focus();" and such (in this case corresponding to Google's home page).  However, there are other expressions that include the "window" object that are proving much more difficult to work with.  Although I can browse the document object's parentWindow object via the property browser, if I try to access that object programatically, I get the error "Error -2147467262 occurred at No such interface supported".  I'm wondering how to include the window object for scripting.
    I'm writing a content-oriented web crawler.  I've been writing it with pretty low level TCP functions, handling 301/302 "object moved" and "<META HTTP-EQUIV="refresh" CONTENT="0; url=http://millercountyliberal.com/">" redirections manually.  But there are other automatic script-based redirections like:
    <script language="JavaScript" type="text/javascript">
    <!-- window.location="http://www.jrnl.com" -->
    </script>
    that I'm still trying to figure out how to work with.  As you can see, to work with that one manually involves the window object.  The reason that I don't just let the Web Browser object handle the redirections is because that object often throws script errors, downloads embedded graphics and other unnecessary components, can't handle some non-standard redirections, and sometimes annoyingly crashes.  Any help would be appreciated.  A code sample is attached.  The Web Browser control should already exist on your machine if you have Internet Explorer installed.  The script control may need to be registered before it can be used as follows:
    regsvr32 "c:\MyDir\XHTTP.dll"
    Thanks.
    Attachments:
    HTML Script Testing.zip ‏773 KB

    Hi Ted,
    This seems to be a problem with the way you are referencing the ActiveX properties.  I would research a little more on the API for these objects.  See http://msdn.microsoft.com/workshop/browser/webbrow​ser/reference/ifaces/iwebbrowser2/document.asp for an explanation of the IWebBrowser2 Document property.  I am suspicious of where you are typecasting the Document variant into the IHTMLDocument2 object and this is where the error is being thrown.
    A search of this error code on Google shows that this is a generic error from the ActiveX object, and not a LabVIEW error, although it is confusing since LabVIEW uses error codes in this same range.
    Hope this helps!
    Doug M
    Applications Engineer
    National Instruments
    For those unfamiliar with NBC's The Office, my icon is NOT a picture of me

  • Browser Check Script Needed

    Hi,
    we need a script, or whatever you sugegst, to include into
    index.htm page which contains main flash file to check user's
    browser and provide a note to users of FireFox and Opera.
    The problem: site built in FLash 8 with Action Script 2 and
    exported for latest Flash player. FireFox and Opera displaying bad
    results, IF THEY DON'T HAVE latest player installed. Even if there
    is a latest player installed for Internet Explorer it does not
    reflect on Opera or FireFox. So we need to tell users to go to a
    specific page on Adobe site and download and install it using these
    browsers.
    Please help.
    Thx.

    P@tty Ayers ~ACE wrote:
    > Gary's post might have been a little sarcastic, but he's
    entirely right that
    > *nobody* is going to download and install software in
    order to visit a
    > certain web site.
    It would be more accurate to say "very few" people will
    download and
    install the software you recommend. I promote Firefox very
    heavily on my
    websites, through a Google Firefox referral button. I get
    very few sales
    - but I do get some.
    In the near future, I will likely scale back my campaign in
    hopes of
    increasing traffic, but I will likely ban visitors using IE
    entirely
    from adult political sites (once they're finished), partly as
    an experiment.
    Note, also, that there are actually quite a few sites that
    suggest or
    recommend particular browsers. For example, if you do some
    research on
    SVG images, you'll find notes that you can't view them in
    certain
    websites unless you download a special SVG viewer. Granted,
    these are
    specialized websites, but aren't all websites unique?
    The script Gary showed you will probably work, except that it
    targets
    ALL non-IE browsers (which may be what you want). You might
    also want to
    check out
    http://explorerdestroyer.com/
    > Michael's suggestion of directing them to a non-Flash
    version of the site
    > makes the best sense..
    >
    Yes, though it sounds like you have a special situation here.
    P.S. Gary White is one of the more respected gurus here. He's
    just too
    lazy to show you a script that specifies Firefox and Opera
    only. :)
    www.geobop.org - Family Websites
    www.invisible-republic.org - Adult political websites (Mature
    adults only)

  • Browser scrollbar scripting?

    I've done a bit of research and still not to sure how exactly
    to do this...
    If you have a fullscreen flash site, by default your browser
    scrollbar is disabled. So if someone's screen is smaller than the
    site, they can't scroll to see whats off the page. How do you
    enable the browser scrollbar with a fullscreen flash site?

    Well I figured you were talking about making my flash movie a
    pixel value instead of percent. But I figured I'd try the
    <div> tag anyway, but no luck there. It constrains the flash
    movie to the size of the <div>.
    So changing my movie to a pixel value isnt really what I'm
    looking to accomplish. (unless there's a way to assign a pixel
    value, but still make it fill 100% of the window) Here is an
    example of the site I'm working on:
    click here.
    As you can/will see, I have limited the amount of content in
    the body, and I cant add anything below that because some monitors
    wouldn't be able to scroll to it.
    Hopefully this helps interpret what I'm trying to do.

  • Reliable Browser Detection Script

    I'm looking for anyone with experience detecting if the browser is making the request is coming from a PDA or cell phone, vs. a desktop.
    I want to redirect all PDAs and cellphones to a different section of the site automatically. I was hoping to find something a little more intuitive than just looking for 'Mozilla" in the user-agent.
    Thanks.

    Actually this seems to work better:
    if (accept.indexOf("vnd.wap.wml") >= 0) {
         // I have a WAP browser...
    }I thought Opera (being WML compatible) would load the WML content, but thankfully it does not broadcast it in the Accept header.
    Thanks.

  • Browser Tab Script

    Hi,
    Does anyone know how to put a logo in the Tab area of a Browser?

    Thanks!
    http://www.schallermedia.com

  • Wmode and dreamweaver browser safe script for active x

    I usually don't use the javascript that dreamweaver generates
    for active content (AC_RunActiveContent.js) I've been using another
    javascriptcode, but at work I've been told to use the code from
    Dreamweaver. Some times I might use transparent Flash or change the
    stacking order using "wmode=opaque" My problem is when I embed a
    Flash file and I want to use wmode neither <param name="wmode"
    value="transparent" /> or "opqaue" works. Am I overlooking
    something.

    I usually don't use the javascript that dreamweaver generates
    for active content (AC_RunActiveContent.js) I've been using another
    javascriptcode, but at work I've been told to use the code from
    Dreamweaver. Some times I might use transparent Flash or change the
    stacking order using "wmode=opaque" My problem is when I embed a
    Flash file and I want to use wmode neither <param name="wmode"
    value="transparent" /> or "opqaue" works. Am I overlooking
    something.

  • Script Browser & Script Analyzer 1.4 issue

    Hi All Powershell Experts,
    Need your assistance on script browser.
    I am using "Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86)   (Build 7601: Service Pack 1) "
    and OS is Windows 7 Enterprise service pack 1
    Powershell Windows version 3.0
    I went through all websites for Script browser, I successfully installed script browser using its setup on Microsoft website but not able to get this feature in my powershell adjacent to command right pane( as described in all websites )
    Your suggestions, assistance welcome. 
    Thanks in Advance
    I Referred below websites:
    http://www.microsoft.com/en-in/download/details.aspx?id=42525
    http://blogs.msdn.com/b/powershell/archive/2014/04/16/a-world-of-scripts-at-your-fingertips-introducing-script-browser.aspx
    http://blogs.technet.com/b/heyscriptingguy/archive/2014/05/10/weekend-scripter-introducing-script-browser-and-script-analyzer.aspx

    Actually the 1.4 version of the script browser still works.  Just install it form here:
    http://www.microsoft.com/en-us/download/confirmation.aspx?id=42525
    Post issues and questions here:
    https://gallery.technet.microsoft.com/scriptcenter/Getting-started-with-57e15ada/view/Discussions#content
    ¯\_(ツ)_/¯

  • Browser is idle when trying to run 2 sessions sequentially in 1 script

    Hi,
    When i try to run 2 browser sessions sequentially in one script.The browser is remaining idle after executing the 1st one.
    Scenario on Execution :
    1st Session: Opens Browser > executes scripts > Closes Browser
    2nd Session: Opens Browser >"Remains Idle" - No error message is displayed,but Open script tool bar in browser is showing an Idle status.
    I tried reinstalling browser helper files but still the issue is not resolved.
    System Configuration :
    Win 7,Openscript 12.2 and browser is IE 8.
    Can anyone please help me on this issue.
    Edited by: 1004422 on 06-May-2013 21:10
    Note : Issue is only observed for custom scripts, for recorded and played back scripts its working fine.
    Edited by: 1004422 on 07-May-2013 06:23

    It is working after replacing the browser.close() to close a session with the web.window("path").close option.
    Thanks,
    Naveen

  • User console redirection webpage uses unnecessary browser sniffing

    User console redirection webpage uses unnecessary browser sniffing
    https://ps.palmws.com/palmcsext/console/
    That user console redirection webpage has this piece of JavaScript that uses unnecessary browser sniffing:
    <script type="text/javascript" language="javascript">
    function checkBrowser()
    var agt=navigator.userAgent.toLowerCase();
    var is_mac = (agt.indexOf("mac")!=-1);
    var is_ie = (agt.indexOf("msie")!= -1);
    var is_opera = (agt.indexOf("opera")!= -1);
    var is_firefox = (agt.indexOf("firefox")!= -1);
    var is_window = (agt.indexOf("window")!= -1);
    var is_safari = (agt.indexOf("safari")!= -1);
    if (is_window) {
    if (is_firefox || is_ie || is_safari) {
    window.location = "/palmcsext/console/pages/LoginPage.iface";
    } else {
    window.location = "/palmcsext/console/notfound/notfound.html";
    } else if (is_mac) {
    window.location = "/palmcsext/console/pages/LoginPage.iface";
    } else {
    window.location = "/palmcsext/console/pages/LoginPage.iface";
    </script>
    The browser sniffing is pretty harmful. Remove it.
    Just simply change the script to:
    window.location = "/palmcsext/console/pages/LoginPage.iface";

    XP1 wrote:
    If you look at the logic, even unsupported browsers will pass the test.
    The if statements only check for supported browsers running on Windows or Mac OSes. If the user is using a different OS, regardless of supported or unsupported browser, the webpage will still redirect correctly.
    The script doesn't do a good job of checking for supported browsers either. The user can set a custom user agent, and the code can't rely on the user agent string.
    Checking for browser support should be done by feature detection, not by user agent string checking.
    If the user sets a custom user agent string or uses a browser with which the code works, then it harms the user.
    The concept of the web is that it should work everywhere. Blocking browsers not only harms the user but also harms the web.
    If the code is written to web standards, the webpage should work in all modern browsers.
    Thus, it is pointless, inefficient, and unnecessary to have those if statements there.
    Like I said, the code can be simplified by just using 1 line:
    window.location = "/palmcsext/console/pages/LoginPage.iface";
    I have asked for more specifics here to find out why that logic is in place.  Not saying I can post back anything, but I have asked.
    And unless I'm reading it wrong, the check for unsupported browsers (so anything NOT firefox, ie or safari) only happens if you're running windows.  If you're on Mac or some other OS, it directs to the working page.  I have asked about that, too.

  • Unable to upload sql scripts in oracle database express edition 10g

    Hi!
    To start, I inform you that I am beginner with Oracle. I installed Oracle 10g Express Edition on my Ubuntu 9.10 like this:
    :~$ dpkg -i oracle-xe-universal_10.2.0.1-1.0_i386.deb
    :~$ /etc/init.d/oracle-xe configure
    and I keep default value. Then I go on http://127.0.01:8080/apex, I login with system account, I create another dba account etc ... all looks very well ! Then I follow this tutorial: http://st-curriculum.oracle.com/tutorial/DBXETutorial/index.htm
    and I am unable to load sql script which is given in this tutorial: load_sample.sql (page:What to do first> Loading Data). I try with a little sql script and same result. I use gedit with UTF-8 and load in UTF-8, my browser is Firefox (I try with Epiphany also).
    The result is: when I upload a script, The browser returns "script uploaded." Then I can click on my script but the file is empty ! Nothing is done when i click on "run". Also I can' create a script; With Epiphany browser, the frame to write is all red. To import a script I have to copy one by one request in sql commands. I try also to change the owner of load_sample.sql:
    -rw-r--r-- 1 oracle dba 49969 2010-01-10 12:05 load_sample.sql
    But it doesn't work. If someone has an idea ? Thanks for your help.
    regards
    Alex.
    load_sample.sql:
    CREATE TABLE regions
    ( region_id NUMBER
    CONSTRAINT region_id_nn NOT NULL
    , region_name VARCHAR2(25)
    CREATE UNIQUE INDEX reg_id_pk
    ON regions (region_id);
    ALTER TABLE regions
    ADD ( CONSTRAINT reg_id_pk
    PRIMARY KEY (region_id)
    ) ;

    Hi,
    So, go to shell ,position yourself in the path where load_sample.sql is, login to the XE as the user with whom you need to run load_sample.sql , and execute
    +@load_sample.sql.+
    Sorry to hijack this thread but I am having exactly the same problem in Ubuntu, it seems as if IE is the only browser that allows you to do this, but installing that in Ubuntu looks like a whole other world of pain I do not really want to get involved in at the moment.
    I like the sound of just shortcutting the sql upload through the shell but I'm a beginner and I do not understand your comment well enough to implement it myself.
    Could you please explain these in more granular layman's terms for someone who is unfamiliar with Linux syntax?
    By 'Shell' do you mean the Terminal or the SQL Command Line? What exactly should I be typing in there to execute the sql?
    I have saved the SQL file on my desktop (jon@jon-pc, it's a virtual Ubuntu machine on a Windows Vista host).
    Thanks in advance
    Jon

  • Cross Frame Remote Scripting  = Access Denied with servlets

    In a Nutshell what I'm trying to accomplish is to update some data in a web
    page by posting to a servlet and not reload the whole page. So I created an
    <IFRAME> to do the dirty work. I am using javascript/dom to copy data from
    the <IFRAME> to the parent.
    This works fine when the URLs are for example...
    parent page = http://localhost:8080/somepath/somepage.html.
    iframe page = http://localhost:8080/somepath/someIframe.html.
    I understand that there is a security restriction(IE 5 and up) crossing
    domains, and this is where some of my comfusion is coming into play.
    When I change the URLs to the my dns address and iframe points to a
    servlet.....
    parent page = http://samw:8080/somepath/somepage.html.
    iframe page = http://samw:8080/somepath/someIframeServlet
    I get an "Access is Denied" error message as I believe the browser thinks
    that the domains are not the same. Not sure though.
    Are there any work arounds to this problem?
    Requirements are IE 5.5 and up, Tomcat as the Servlet Engine, and only the part of the page displaying the data collected gets refreshed.
    Thanks,
    Sam

    This is a security feature of the browser's scripting engine - you cannot access the DOM of a window/frame on a different domain, regardless of whether or not the actual server serving up your page is the same serving up the other. The only recourse is to make sure you use the same domain in the urls for frame sources.
    Hope this helps,
    -Scott

Maybe you are looking for

  • Problem with Router 54g2

    Hi,  I want configure router 54g2 for work mode bridge , but I can't . I have read manual but I can't find instruction enough for procedure. Somebody can help me ? The router 54g2 work mode bridge ?  Thank very much  Bruno Steven 

  • How to close open cursors in a forms app

    All, I'm not a forms developer. I'm a database administrator so I'm asking this question from that perspective. I know nothing about forms development. We have several forms applications that appear to hold many SELECT cursors open when they run. I'v

  • Does any1 know what generation an ipod touch is if its about 2-3 yrs old??

    a friend of mine is giving us her old ipod touch but she cant remember what generation it is she said shes had from new about 2-3 yrs ago can u help?? also if i were to restore it would i have a problem downloaded the new iOS update on it or is it no

  • Renumber Items - Process Purchase Orders

    When you are in the change mode for a Purchase order, I see Renumber items button next to the Add items button Does anybody know what is the functionality of this button 1) Does it renumber and sort the items in the descending order compared to the o

  • Can't re-install previous purchases from Mac AppStore

    I previously deleted the Victoria 2 games that I had bought and installed from the Mac AppStore. I've done this so many times with Steam because I don't like games/apps that I don't use taking up space. Then I go back and reinstall later if I want to