Going to another html file in a script

I won't lie to u, I'm new programing. I have a page script that uses the window.location = URL and it works (is for a proyect) but the professor wants it to work localy so i transalted my pages using frontpage so they don't have an URL but i can't find a way to make the scripts go to the local pages. What can i do?
This is an example of the code:
alert('Wrong password, please try again');
window.location="wrong.htm";
where wrong.htm is the local file, it worked when it said:
alert('Wrong password, please try again');
window.location="http:\\URL...\\wrong.htm";
Hope u can help me.

Moreover, if your file is in the same directory as the other html files, you should be able to use :
alert('Wrong password, please try again');
window.location="wrong.htm";
If it's in a different directory from your main page, you can use the relative path. Let's say that your "wrong.htm" is in a subdirectory called "error", you could use :
alert('Wrong password, please try again');
window.location="error\\wrong.htm";

Similar Messages

  • Move group of pages from one InDesign file to another InDesign File using VB.Script

    Dear team,
    I am trying to move group of InDesign pages from one indesign file to another indesign file using vb.script.
    I have written the code like
    Dim Pages=IndDoc.Pages
    Dim Mytype=TypeName(Pages)
    Pages.Move(InDesign.idLocationOptions.idBefore,IndDoc1.Pages.LastItem)
    but it is giving an error as method Move is not a member of Pages 
    please give mme the solution to move the Multiple pages or a group of page from one Indd to another Indd.

    Hey Peter, if I wan to move several page that part of Auto Flow text, I checked the "delete page after moving" but the content still there, not deleted.
    Is there any way to delete it automatically, just to make sure I have moved that autoflowed page?

  • Calling HTML File in Shell Script.

    Hi
    I have a shell script and a HTML file.
    HTML file is to create a Table.
    the HTML Script is as follows
    <html>
    <body>
    <table border="1">
    <tr>
    <td>Requisition Number</td><td>$PARAM0</td>
    </tr>
    <tr>
    <td>Purcahse Order Number</td><td>$PARAM4</td>
    </tr>
    <tr>
    <td>Purchase Line Number</td><td>$PARAM5</td>
    </tr>
    <tr>
    <td>Hold Reason</td><td>$PARAM3</td>
    </tr>
    <tr>
    <td>Hold Date</td><td>$PARAM2</td>
    </tr>
    </table>
    </body>
    </html>
    The output of this HTML file is a table with 5 rows and 2 columns.
    I saved this file as mail.html and placed it in the server where i have placed the Shell Script.
    When i call this HTML in Shell Script ... as follow
    cat /FND_TOP/bin/mail.html
    the output is not the table but infact the html tags are displayed.
    I need the table when i run this shell script.
    It would be of great help if anyone has a good solution for this.
    Thanks in Advance

    First, you need to put the file where your httpd server (you will need apache running) can find it. This is usually some place like:
    /var/www/html/table.htmlThen use a text-mode browser as Frits suggested to render it so your script can read it:
    #!/bin/sh
    lynx -dump http://localhost/table.html | while read row; do
        echo "${row}"
    doneor how ever you want to process the data.
    Another approach is to use XML transformations. First write an XML stylesheet:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" version="1.0">
         <xsl:output indent="no" method="text" standalone="yes" version="1.0"/>
         <xsl:template match="*">
              <xsl:apply-templates/>
         </xsl:template>
         <xsl:template match="td">
              <xsl:text> </xsl:text>
              <xsl:value-of select="normalize-space()"/>
         </xsl:template>
    </xsl:stylesheet>and then run your HTML through the {font:Courier}xsltproc{font} processor:
    $ xsltproc table.xsl table.html
    Requisition Number $PARAM0
    Purcahse Order Number $PARAM4
    Purchase Line Number $PARAM5
    Hold Reason $PARAM3
    Hold Date $PARAM2To be neat, I have omitted the many blank lines that were also output.
    HTH

  • Multiple HTML-files in one stack / link another HTML-file in a stack

    Hi,
    I want to integrate a webapp (html/js) into a stack of a dps-folio. All the HTML works fine ... all no problem, but at clicking the first link on the initial HTML-document the next (local) HTML-File is opened in a slider with a "ready"/"Fertig"-bar at the top. But I want, that all html files are seamlessly loaded in the same view.
    At this point i found: http://help.adobe.com/en_US/digitalpubsuite/using/WS67cb9e293e2f1f60-8ad81e812b10bfd837-80 00.html and i made the file "NativeOverlays.config" and moved it to the described location. After that, the behaviour was correct in the desktop-preview-app of the DPS, but it still fails on the iPad-Adobe-Viewer.
    How can i link between HTML-files without any interuption or sliding?
    Thank you!
    Christian

    Hi Tim,
    Thanks for replying. I have looked for "PDFBookBinder class" in xml publisher user guide for ver 5.6.2. I didn't get any reference of this text. Can you please guide me to a tutorial/link where i can get more information about this class.
    Also, i originally thought of similar to your second logic, as my design basis. Oracle process generates the xml file in output directory which i can get. What i didn't get is how do i "pick them up and merge" using publisher. Also, is there way to do this merging process using pl/sql ? Can you please give little more information on your second approach.
    My original plan of action is that i will create a report set in which i will call oracle seeded report for all 7 payrolls in a sequential manner. Then using the child requests of the report set i will get to 7 xml files generated by seeded oracle process. Then the piece i am not sure of , i will use those 7 files to generate a single xml file having payroll name as tree top for each output. Once single xml is ready, i can easily design a template and register the process to generate output as Excel.This process will not require me to actually change any data or do any calculation. It will only reformatting the feilds we see and abiity to see all 7 payroll at one time rather then entering these numbers manually into an excel to do analysis.
    Please provide your feedback, if you think above plan is not feasible or need corrections.
    Best Regards,
    Ankur

  • How to include html files in another html files?

    Hello,
    I am wondering if there is any way of including content (html code) inside another html page..
    I've tried:
    - iframe - it's working fine but IE7 doesn;t like it.
    I am looking for something similar with:
    - Server Site Include <!--#include virtual="/directory/included.html" -->
    but without to have to change the portal settings.
    Any idea?
    Thank you
    Anca

    HI did u try using the omniportlet? on Portlet builders

  • Can I link my Media Query to a HTML file?

    Can I make this below:
    <link href="mobile.css" rel="stylesheet" type="text/css" media="only screen and (min-width:300px) and (max-width:320px)">
    to link to an HTML file instead like -> <link href="mobile.html" rel="stylesheet" type="text/css" media="only screen and (min-width:300px) and (max-width:320px)"> ?
    Thanks in advance.

    I'm trying to get the browser to look at what "media width" and then autodirect to another html file. So as an example:
    Webpage opens, looks to see if i'm on a device that has a maximum width of 320px if NO then it stays as is. if YES, it loads another html file that is 320px freindly.
    My website has stacks of java going on, and will not work on mobile devices properly. Just changing the css file won't do anything close to what the website looks like.
    I've searched and searched and found nothing.

  • Link style sheet to .html file?

    Hey dreamweaver community i'm really new to dreamweaver but have a slight grasp.
    But i am creating a website (ethicistbeats.com). I have a design by using a css. style sheet and everything looks good in dreamweaver safari preview (on a mac), but when i upload it to my ftp client my designs/ format of my page does not show up, at all.
    If you guys could reply and try to help me out that would be cool. i tried talking to one pf my friends who took a class on html code, but he couldn't help me.
    Anyways, thanks in advance.
    If you guys need more info about code and stuff i'll gladly upload it. Just again i'm new to this so i don't really know much... i just dove into dreamweaver like a need a webpage, not much help, but my site wasmade from a template - not sure if that helps.
    Peace.

    Unfortunatly, you have quite a mess on your hands.  First you have embedded css above the external style sheets, which takes away one of the big advantages of embedded css, namely to override any rules in the external style sheet.
    <style type="text/css">
    .A {
         color: #E12000;
    .b {
         color: #000;
    </style>
    But that is peanuts to the other probelms,
    Your style sheets are not css files, they appear to be an html file.  To create an external style sheet, go up to File | New | CSS and a new CSS blank file will be created.  Paste your css rules into it.
    You have
    <link href="http://www.ethicistbeats.com.css" rel="stylesheet" type="text/css" />
    While I suppose you could link using an absolute link, I dont see an advantage,
    but it would be more like
    <link href="http://www.ethicistbeats.com/stylesheet.css" rel="stylesheet" type="text/css" />
    a better way would be
    <link href="stylesheet.css" rel="stylesheet" type="text/css" />
    This is not a style sheet, but another html file.
    <link href="Index.html.css" rel="stylesheet" type="text/css" />
    Take whatever css is in the files and put them into a new css file.
    Start there, but there is more work to do.
    gary

  • Loading different banners into html file depending on screen width? (Responsive)

    I have a html file that has my banner in it. I call my banner into the html file with this script in the head section: <script type="text/javascript" charset="utf-8" src="banner_edgePreload.js"></script>
    I also have a second banner called banner2. So all I have to do to switch the banners in my html file is put a 2 after the word banner in the script above ^ because they use the same resources.
    Now im trying to get it to change from banner to banner2 when screen width is 1200 or less.
    I was using this code but it doesn't seem to be working:
    <script type="text/javascript" charset="utf-8" src="banner_edgePreload.js"></script>
    <script type="text/javascript" charset="utf-8" media="screen and (max-device-width: 1200px)" src="banner2_edgePreload.js"></script>
    Any ideas on how I can get this to work?
    Thanks!

    Not sure if this is what you are looking for
    Different Banners (and sizes) for different pages? - Squarespace Answers

  • Html file in web page composer

    hi expert,
    i have create one html file. the html file contain jsp script. the output is very well when i run it on my pc but when i put it in container of web page composer, the output is not display. why its happen?how can i use the html file that contain jsp script in web page composer?
    thanx in advance,
    faeza

    Hi
    You can create a new layout with width and height as per your requirements and use the layout in WPC.
    For creating new layouts, check the help link below
    http://help.sap.com/saphelp_nw70/helpdata/EN/45/d2970be57f4ebbe10000000a11466f/content.htm
    Regards,
    Yoga

  • Link button in applet to open html file in same window

    Hello I am an student in holland.
    I am working on a project but can't find a code to make a button what links to an html file practicly just a link
    I got a html where i need to implent the applet to the applet only needs 10 buttons who can link to another html file or site.
    its not realy difficult i geus but i just cant find the right codes and because i only got 1 day left im asking for help on this forum.
    I realy hope you guys can help me.
    greets,
    Rob

    It's hard to tell what you're asking, but you should probably take a look at java.applet.AppletContext.showDocument.

  • How to load an html file in Text Box using script?

    Hi,
    does anyone know what is the sequence of commands for inserting an html file in a text object, if possible, via vbs?
    Unfortunately, I wasn't able to find the Commands and Variables for the text object (aka user object) in the help. Where I can search for them?
    Thank you!

    Hi def90,
    Sorry for the confusion. In that point the help information is not correct. We can only import RTF and ASCII via script but not HTML. We are going to change the help for that.
    Greetings
    Walter

  • Why does DW CC 2014.1 Fluid Grid load HTML file that contains Google Analytics Tracking Code script so slowly?

    I exclusively work in Fluid Grid since my site is a Responsive Web Design.  I'm having trouble with slow load time in DW CC 2014.1, when my file, as they all do of course, has the Google Analytics Tracking Code script.
    I'm on a Windows 8.1 using a Dell Precision M3800 Laptop with Memory 16GB (2x8GB) 1600MHz DDR3 . Each of our site's 180 or so web pages, of course, has its Google Analytics Tracking Code script. It is placed, following Google instructions, as the last entry in the <head>.  Google Analytics does not instruct to place the script in the JS Folder with an scr to it, but rather in the <head>.  It takes up to one and a half or two minutes for DW CC 2014.1 to load the Google Analytics Tracking Code script .  That is, the grid does not show in Live View until finally analytics.js shows up in the Document Toolbar. A minute or two can add up when every page you load takes this long.  And, making new Fluid Grid pages, as is done, through the Save As command; every new page made you have to deal with the minute or two wait time since all those pages have the Google Analytics Tracking Code script.  Therefore, this time component alone, assuming I'm accessing and/or making 20 pages per week (and in our business this is easily the case) the math is that I'm wasting between 17 and 35 hours per year just with DW CC 2014.1 loading the much needed Google Analytics Tracking Code script.
    I have loaded HTML files that do not have the Google Analytics Tracking Code script as a test and those files load at the normal quick speed.
    Therefore, the new Chromium Embedded Framework browser engine has a serious load problem when it confronts an HTML5 file with a Google Analytics Tracking Code script.  Oddly, the prior DW CC 2014 version, with the old browser engine did not have this slow-load problem since I was loading these same files in that DW CC version up until October 8th or so.
    I think this new browser engine is a Google platform that apparently has a problem rendering or loading a Google Analytics Tracking Code script.  That makes no sense.
    Anyone else had this particular slow-load problem with DW CC 2014.1?
    Thanks.

    Wow.  That sure solved the slow-load problem, at least using your suggested snippet in a simple test HTML file.
    Per Google's instructions, I pasted the snippet before the closing </head> tag.  And, even in that positioning in the file; the file loaded at the speed (about one second) that it did prior to DW 2014.1.
    Two questions.
    Will this snippet provide the same tracking data as my current GA snippet?
    Because my current GA snippet is in about 200 web pages, can I retain the old snippet in most of them and place the new snippet in my approximately 5 main web pages as well as my templates so my new pages, as well as my main pages, have the new snippet.  That is, can I have both snippets (i.e. old snippet in earlier pages and new snippet in main pages and new pages to be made going forward) in my website at the same time?
    Of course I would not have both the old and new snippet in a web page at the same time.
    I greatly appreciate any assistance anyone can provide me on this issue and thank all of you in advance.
    I've provided code for both simple test files below.
    Code for Asynchronous Syntax of GA script:
    <!doctype html>
    <!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
    <!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
    <!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
    <!--[if gt IE 8]><!-->
    <html class="">
    <!--<![endif]-->
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Test Asynchronous GA Tracking Code In Head</title>
    <link href="css/boilerplate.css" rel="stylesheet" type="text/css">
    <link href="/css/style.css" rel="stylesheet" type="text/css">
    <!--
    To learn more about the conditional comments around the html tags at the top of the file:
    paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
    Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):
    * insert the link to your js here
    * remove the link below to the html5shiv
    * add the "no-js" class to the html tags at the top
    * you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build
    -->
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="js/respond.min.js"></script>
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-73425000-1']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    </script>
    </head>
    <body>
    <div class="gridContainer clearfix">
      <div id="div1" class="fluid">
        <div id="test1" class="fluid ">This is the content for Layout Div Tag "test1"</div>
       <div id="test2" class="fluid ">This is the content for Layout Div Tag "test2"</div> 
    </div>
    </body>
    </html>
    Code for older GA script snippet:
    <!doctype html>
    <!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
    <!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
    <!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
    <!--[if gt IE 8]><!-->
    <html class="">
    <!--<![endif]-->
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Test GA Tracking Code In Head</title>
    <link href="css/boilerplate.css" rel="stylesheet" type="text/css">
    <link href="/css/style.css" rel="stylesheet" type="text/css">
    <!--
    To learn more about the conditional comments around the html tags at the top of the file:
    paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
    Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):
    * insert the link to your js here
    * remove the link below to the html5shiv
    * add the "no-js" class to the html tags at the top
    * you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build
    -->
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="js/respond.min.js"></script>
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
      ga('create', 'UA-73425000-1', 'auto');
      ga('send', 'pageview');
    </script>
    </head>
    <body>
    <div class="gridContainer clearfix">
      <div id="div1" class="fluid">
        <div id="test1" class="fluid ">This is the content for Layout Div Tag "test1"</div>
       <div id="test2" class="fluid ">This is the content for Layout Div Tag "test2"</div> 
    </div>
    </body>
    </html>

  • Import data from another browser - Only few IE9 favorites get transfered to bookmarks. HTML solution - HTML file all favorites correct, but same result

    Win7 / IE9: First time use. Example: One favorites folder has 4 HTML entries - only 2 get transferred. Some have none transfered - folder empty. Others have random correct + some missing.

    Monday Nght
    I can see complete IE9 Favorites HTML list in HTML file on Desktop with Firefox -> New Tab -> Open File.-> Open
    In desktop HTML file, there are 37 IE9 folders with no more than nesting 3 deep in any one top folder. These are all correct wrt IE9 favorites.
    All top folders + deepest nests are copied to FF ok. Contents random. Copied contents work ok
    7 HTML web sites not allocated to IE9 top folders are also copied <- these 7 copy to FF and work ok
    Example: First folder in IE9 list has no nesting., IE9 has 4 entries - Firefox has only 2. when either method of copying is used.
    BTW - please advise how I can delete whole Bookmark list in Firefox in one keystroke to be able to retry with a clean Bookmark list
    I am going to uninstall Firefox and start again with a clean copy and use HTML method only to try to transfer IE( files. I will report result.
    BTW, I am in UK on UK time - hence delays in replying - need to sleep sometimes!!!!!
    Tuesday Evening
    Hi
    I uninstalled Firefox. Re installed and loaded IE9 favorites from HTML file.
    All seem copied correctly
    First time I started by using the "import data from another browser". Partial copied.
    Then I tried "Import from HTML file" without deleting whatever favorites had been copied. Still partial copied.
    All seems well.

  • My imported backup html files from another computer do not show up after import

    I am currently transferring files from my macbook pro to a pc netbook. I already exported my firefox bookmarks via an external drive and accessed the html file on my new netbook. After importing the html on firefox on my new netbook, the bookmarks do not show up on my bookmark list.

    Please see this article on how to move your bookmarks and settings from one computer to another: [[Moving your Firefox bookmarks and settings]].
    Caution: Restoring bookmarks from a backup will overwrite your current set of bookmarks with the ones in the backup file.

  • Saving text generated by script as an html file

    Hi
    I have designed a script that generates text which I would like to save as an html file called 'index.html' on my desktop. Is it possible to do this using TextEdit or some other application?
    Thanks
    Nick

    You don't need to use an app to accomplish this. The following will take the contents of a variable myHTML, create a file test.html, write to it, and close it.
    If you are generating the HTML in a loop, you can write to the file as it's generated or - as here - put it all into a single variable and write in one go.
    You'll probably want to specify a complete path for the file!
    set myHTML to "some html"
    set theFile to open for access file "test.html" with write permission
    set eof theFile to 0 --empties file if it contains anything
    write myHTML to theFile
    close access theFile

Maybe you are looking for

  • Low memory performanc​e

    When doing any memory performance tests on my new to me T61, Windows 7, 64bit, 4GB's memory machine, I have very slow performance results compared to any other known similar configurations. 2 well known sites I've tested at are http://browse.geekbenc

  • USB Sticks don't mount

    After having returned from a two week vacation my 2 USB-Sticks (SanDisk 1 G and Yakumo 512 MB) suddenly don't mount anymore. If I start DiskUtility it keeps spinning and spinning, if I pull the Stick out DiskUtility stops spinning and shows the stick

  • Invalid field format (screen error) on Table Control

    Hello, When selecting a line or multiple lines on a screen made by me(using a Table Control), I get Invalid field format (screen error). Debugging the code it sends the message when looping the internal table on PAI to check if there were values chan

  • Please reconcile source list records - source list

    Hi,     I am getting the following error while trying to add a line to the source list - purchasing. Please reconcile source list records Message no. 06 329 Diagnosis      One or more source list records contain(s) conflicting data (e.g. two      rec

  • Can i get my Rev. A replaced?

    hello all, I have the original iMac G5 (revision A). it has been trouble free for a bit, but now is starting to act up again. first off, if the computer is turned off and unplugged for a bunch of hours, when i go to hook up the power cable, the compu