Syntax Error In Javascript Popup Window

I'm wondering if anybody can help me out here with a curious bit of code. I'm using GoLive 9 to generate Javascript popup windows. They seem to work fine, but when I check the syntax I get these errors:
Line 22 Unexpected PCDATA
Line 24 The Corresponding start tag is missing
Specifically, it references this code:
</script>
//-->
</script>
But every time I try to delete or modify those lines I lose the link to my css file and can't link it back. Does anybody out there with a whole lot more brains than me have a solution? Remember, I'm stupid, so if you have a fix I'd appreciate it being explained as simply as possible. Thanks. BTW here's the entire code for the Javascript popup page below:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Adobe GoLive" />
<title>1408</title>
<script type="text/javascript"><!--
<script type="text/javascript">
//Global var to store a reference to the opened window
var openedWindow;
function openWindow()
openedWindow = window.open('moreinfo.htm');
function closeOpenedWindow()
openedWindow.close();
</script>
//-->
</script>
<link href="../../../BAD/michaelthibault.com/css/agl-styles.css" rel="stylesheet" type="text/css" media="all" />
<link href="../../../BAD/michaelthibault.com/css/java.css" rel="stylesheet" type="text/css" media="all" />
<style type="text/css" media="all"><!--
a:link { color: #838383; }
a:active { color: #838383; }
.dsR1 /*agl rulekind: base;*/ { width: 480px; height: 260px; }
#media { position: absolute; top: 50px; left: 50px; width: 480px; height: 260px; z-index: 1; }
#pause { position: absolute; top: 320px; left: 50px; width: 180px; height: 15px; z-index: 2; }
#close_a { position: absolute; z-index: 3; top: 336px; left: 50px; width: 180px; height: 19px; }
--></style>
</head>
<body>
<div id="media">
<object class="dsR1" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="204" width="480" align="left">
<param name="enablejavascript" value="true" />
<param name="bgcolor" value="#1a1a1a" />
<param name="src" value="../../media/01_trailers/1408_tlr1r_h.480.mov" />
<param name="autoplay" value="true" />
<param name="controller" value="false" />
<embed align="left" height="204" pluginspage="http://www.apple.com/quicktime/download/" src="../../media/01_trailers/1408_tlr1r_h.480.mov" type="video/quicktime" width="480" controller="false" autoplay="true" bgcolor="#1a1a1a" enablejavascript="true"></embed>
</object></div>
<div id="pause">double click in center to pause</div>
<div id="close_a">
<a href="javascript:self.close();">close window</a></div>
<p></p>
</body>
</html>

You have a script tag nested inside another script tag. Try changing this:
< script type="text/javascript">< !--
< script type="text/javascript">
//Global var to store a reference to the opened window
var openedWindow;
function openWindow()
openedWindow = window.open('moreinfo.htm');
function closeOpenedWindow()
openedWindow.close();
< /script>
//-->
< /script>
...to this...
< script type="text/javascript">< !--
//Global var to store a reference to the opened window
var openedWindow;
function openWindow()
openedWindow = window.open('moreinfo.htm');
function closeOpenedWindow()
openedWindow.close();
//-->
< /script>

Similar Messages

  • JavaScript Popup Window

    Hi, has anyone done an example where you are at a page, say Page1.jsp that has a text box and a button, when you click on the button a javascript popup window must open(Page2.jsp). Page2.jsp has a text box and a button. The user will enter a value in the text box and when they click the button it must close the popup window and populate the text box on Page1.jsp with the value entered on Page2.jsp.
    Is this possible in JSF, I have tried but it doesn't work. On the popup windoow botton I have javascript code that saves the value in the session, submits the parent page and then closes the popup window.
    On the parent page init, I look for the value saved in the session var and set the textbox's text to it. When I read the value of the text box, it is right but on the screen the value does not show up at all,
    Does anyone have any idea, I can't seem to understand at all what could be wrong here.

    Hi,
    You can use this code:
    1. in the parent form you have a button and a text field named "textCallClass".
    2. in the popup window you have listbox and a button.
    When the button on the popup window is clicked, the selected list item is returned.
    In you popup window, button on_click :
                        <script>
                            function handleOK() {
                                var myform      = document.forms[0];
                                var listControl = myform['form1:listboxID'];
                                var openerField = window.opener.document.getElementById("form1:textCallClass");
                                if (listControl.selectedIndex == -1) {
                                    alert ("Please select an item from the list !");
                                    return false;
                                else {
                                    openerField.value = listControl.options[listControl.selectedIndex].value;
                                    window.close();
                        </script>In the parent form, button on_click:
                            function handleCallClassPopup() {
                                window.open("CallClassLookup.jsp", "Lookup", "width=250,height=300");
                            }A better way is to use the SessionBean to store and retrieve the data.
    Catalin Florean.

  • Retaining BSP page chages with Javascript popup window

    Hi Experts
    We are using a customized BSP application for our performance
    Management. To propmt users for saving their appraisal documents
    before a session timeout,we used an Javascript popup message(alert
    window). This window doesnot affect the BSP page in any way.(code
    provided below)
    Per changed requirement,we now have to retain the BSP page values once
    the user clicks 'OK' on this javascript popup window. I used the page
    refresh option with script. But this is erasing the earlier values.
    Can anyone tell me,how i can holdback the BSP page values after the
    user action on the popup window. If a piece of code is provided,it
    would be greatly appreciated.
    Thanks in Advance
    Alan
    Existing code for timeout popup
    javascript code
    function remind (){
    var msg = "Your Session will expire in the next 10 minutes. Please
    save your data.";
    alert the msg(using alert box)
    <%
    data: v_rem type string.
    DATA: port TYPE STRING.
    data: l_timer type string.
    port = request->get_header_field(
    if_http_header_fields_sap=>server_port ).
    DATA: services TYPE TABLE OF ICM_SINFO.
    CALL FUNCTION 'ICM_GET_INFO' TABLES SERVLIST = services.
    FIELD-SYMBOLS: <service> TYPE ICM_SINFO.
    DATA: wait TYPE STRING.
    READ TABLE services ASSIGNING <service> WITH KEY service = port.
    wait = <service>-KEEPALIVE - 10.
    CONDENSE wait.
    ****Start Changes: Timeout
    **l_timer = wait * 60 * 1000.
    l_timer = 1 * 60 * 1000.
    ****End Changes
    concatenate `'remind(` wait `)',` l_timer into v_rem.
    %>
    <htmlb:content design = "DESIGN2002+DESIGN2003"
    sessionManagement = "TRUE"
    controlRendering = "SAP">
    <htmlb:page title = "<%= otr(ZPMDGL/TITLE_DOCUMENT) %>"
    disableBackspaceNavigation = "TRUE" onLoad pass v_rem as a parameter to setTimeout

    duplicate post locked.
    Raja

  • Retaining BSP Page values with Javascript popup window

    Hi Experts
    We are using a customized BSP application for our performance
    Management. To propmt users for saving their appraisal documents
    before a session timeout,we used an Javascript popup message(alert
    window). This window doesnot affect the BSP page in any way.(code
    provided below)
    Per changed requirement,we now have to retain the BSP page values once
    the user clicks 'OK' on this javascript popup window. I used the page
    refresh option with script. But this is erasing the earlier values.
    Can anyone tell me,how i can holdback the BSP page values after the
    user action on the popup window. If a piece of code is provided,it
    would be greatly appreciated.
    Thanks in Advance
    Alan
    Existing code for timeout popup
    javascript code
    function remind (){
    var msg = "Your Session will expire in the next 10 minutes. Please
    save your data.";
    alert the msg(using alert box)
    <%
    data: v_rem type string.
    DATA: port TYPE STRING.
    data: l_timer type string.
    port = request->get_header_field(
    if_http_header_fields_sap=>server_port ).
    DATA: services TYPE TABLE OF ICM_SINFO.
    CALL FUNCTION 'ICM_GET_INFO' TABLES SERVLIST = services.
    FIELD-SYMBOLS: <service> TYPE ICM_SINFO.
    DATA: wait TYPE STRING.
    READ TABLE services ASSIGNING <service> WITH KEY service = port.
    wait = <service>-KEEPALIVE - 10.
    CONDENSE wait.
    ****Start Changes: Timeout
    **l_timer = wait * 60 * 1000.
    l_timer = 1 * 60 * 1000.
    ****End Changes
    concatenate `'remind(` wait `)',` l_timer into v_rem.
    %>
    <htmlb:content design            = "DESIGN2002+DESIGN2003"
                   sessionManagement = "TRUE"
                   controlRendering = "SAP">
    <htmlb:page title = "<%= otr(ZPMDGL/TITLE_DOCUMENT) %>"
                  disableBackspaceNavigation = "TRUE" onLoad pass v_rem as a  parameter to setTimeout
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:32 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:34 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:35 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:36 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:36 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:37 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:38 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:39 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:40 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:40 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:44 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:46 AM

    If the BSP page is refrehed, all the user input it sent back to the server. If you don't do anything special, the input is lost and not sent back to the client again. You can go to your controller class' DO_HANDLE_DATA to read the user input, and store it in the controller class to send it back to the client.
    If you don't use controller classes, the equivalent would be onInputProcessing. A more advanced alternative would be to use MVC model binding, which would do most of the stuff automatically for you.

  • Javascript popup window for updatable report

    We have an updatable report and would like to have a pop-up window on one of the fields. What parameters do we pass to the pop-up so it can return the selected value to the correct row and column in the would report? What is the code in the pop-up to set the correct row/column in the updatable report?
    We are familiar with the process for form elements, but not for updatable reports.

    Hello,
    YOu just have to save the current working form field as a variable. So the popup javascript would look something like this.
    var gReturnElement;
    function customPopUp(pThis){
    gReturnElement = html_CascadeUpTill(pThis,'TD').getElementsByTagName('INPUT')[0];
    /*popup code here*/
    Then from the popup window you would use something like
    function customSetValue(pText){
    window.opener.gReturnElement.value = pText
    window.close();
    Is there a specifc reason you can't use the built in ones? It would be much easier for you to mantain compared to custom code.
    Carl
    Message was edited by:
    Carl Backstrom

  • Javascript - popup window - diplay an jpg only.

    How do take the Javascript belowr to display popup window to display an jpg only.
    The below javascript was design to work wit a URL - Would like to change it to return a ipg image only..
    ========================
    script type="text/javascript">
    function myPopupURL(url)
    w = open(url,"winLov","Scrollbars=1,left=0,top=0,resizable=1,left=0,top=0,width=500,height=200");
    if (w.opener == null) w.opener = self;
    w.focus();
    </script>
    OTN
    Message was edited by:
    Motor_City

    I'm not so hot on JavaScript myself, maybe you want to take that question into the Oracle Application Express (APEX) forum.
    C.

  • GetURL - javascript - popup window

    Hi!
    I need to get a button to open a new, fixed-size, pop-up
    window.
    This is what I used:
    on (release) {
    getURL("javascript:window.open('ponuda_tjedna.html','Ponuda
    tjedna','width=350,height=250')");
    It works just fine, opens a new window etc. but the main
    window where the button is (where the site is) goes blank, white..
    and in the upper lef corner it says: [object Window]. If I click
    BACK, it restarts the entire site.
    What can I do to keep the main window where it is?
    I've also tried writing a function in javascript directly
    into the <head> tag of index.html and call the function from
    within Flash, using getURL. That did open a new window and the main
    site didn't go blank, but in IE nothing happened.
    Thanks,
    Igor

    > on (release) {
    >
    getURL("javascript:window.open('ponuda_tjedna.html','Ponuda
    > tjedna','width=350,height=250')");
    > }
    >
    > It works just fine, open a new window etc. but the main
    window where the
    > button is (where the site is) goes blank, white.. and in
    the upper lef corner
    > it says: [object Window]. If I click BACK, it restarts
    the entire site.
    You need void(0) with window.open because it returns stuff
    and if you don't void
    the request it will do exactly what it does to you. Not the
    case if you are using
    NewWindow function. Anyway, try this instead:
    getURL("javascript:n_name=window.open('ponuda_tjedna.html','Ponuda_tjedna','width=350,heig ht=250');void(0);");
    Best Regards
    Urami
    !!!!!!! Merry Christmas !!!!!!!
    Happy New Year
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • How to display error message in Popup window

    Hi,
    I have main view and when I click button I opened new pop up window.
    I have some validation for the form in pop up window. I want to display the error message in pop up window.
    Please let me know how to get it.
    Thanks

    Hi mami,
           Is is very difficulty to request focus to the POP window..in our case we are trying lot of time ..but we are not success to display massage in pop window.
    you will  put TEXTView in you pop window where you want to display massage in you POPWINDOW.
    and Create one context value Attribute as Massage
    Value Attribute-----ErrMassage.
    ErrMassage Attribute set your Text property of TEXTVIEW  UI Element.
    If(your condition is TRUE){
    //Excute Your code perfectly.
    else
    wdContext.currentContextElement().setErrMassage("Please provide proper name");
    In this way we were this massage showing in our popwindow..
    thanks
    jati

  • Passing Value from a Popup Window Back to the Parent Window

    I am using JSF. I try to pass a value that is entered by users in the popup window back to a text field in the parent window.
    quote: document.forms[ ].elements[ ] is null or not an object.
    The relevant code snippets are shown below. The screen1.jsp is the parent window:
             <script language="JavaScript1.1">
               function doPopup(source)
                    popup = window.open("externalFilePopup.jsp",
                        "popup",
                         "height=300,width=200,toolbar=no,menubar=no,"                    + "scrollbars=yes");
                    popup.openerFormId = source.form.id;
                    popup.focus();
               </script>
    <h:outputText value="Enter the external system file name"/>        <h:inputText value="#{dataManagementBean.ip}" size="18" />
    <h:commandButton value="..." onclick="doPopup(this); return false;" />
    ..........The externalFilePopup.jsp is the popup window:
            <script language="JavaScript1.1">
                function doSave( value )
                   var formId = window.openerFormId;
                   opener.document.forms[ formId ].elements[ formId + ":ip" ].value = value;
                   window.close();
            </script>
         <h:outputText value="IP Address: "/>
         <h:inputText size="25" value="#{dataManagementBean.ip }" required="true"/>
         <h:commandButton value="OK" onclick="doSave('#{dataManagementBean.ip}');"/>
            .......... The script error occurs when I click on this OK button.
    Please point out the mistakes in my code. Thank you.

    I have made some modifications to the code in the popup window. The error reported in my previous posting is gone. But, I still have several problems:
    1. syntax error in the popup window jsp page: line 45, char 21, syntax error, ..., Do you want to continue running script on this page?2. The popup window does not close after I click on the OK button that I coded in the popup window jsp.
    3. The value that I entered in the popup window eventually gets passed back to the text field in the parent window only if I re-run the application.
    The relevant JavaScript code snippets are:
            <script language="JavaScript1.1">
                function doSave( value )
                   var formId = window.openerFormId;
                   opener.document.forms[ formId ].form[ formId + ":ip" ].value = value;
                   window.close();
            </script>
                                       <h:outputText value="IP Address: "/>
         <h:inputText size="25" id="ip" value="#{dataManagementBean.ip }" required="true"/>
         <h:commandButton value="OK" onclick="doSave('ip'); return=false;"/>
    ......What are the mistakes that I made?

  • Reg:Internal Popup Window:Error messages

    Hi All,
            I am using a Internal Popup Window, but the error messages of "Popup window" is shown in the "Parent Window" instead of showing in "Popup Window". please suggest me to get the Error messages in "Internal Popup Window"
    Thanks
    Nagaraju

    Hi Naga,
    Disable the parent iviews message area before calling the child(popup) window. Then you can get the message in the child(popup) window.
    According to documentation, oldest (parent) message area would be used if there are more than one windows (in a layout).
    see this thread also How to display messages in pop up windows?
    PradeeP

  • CS3.....using actionscript 2.0.....how do i make a popup window that actually works?

    Iv'e been trying all types of code and am pulling my hair
    out......how do i go about making a javascript popup window that
    works in safari, as well as all the other browsers? Im getting this
    error when i try to use safari:
    Safari doesn’t allow JavaScript to be used in this way.
    I just want a simple javascript popup window thats not going
    to give me any type of problems...please. I have a button on my
    stage called StartSearch.
    What code do i put in the actionscript? where do i place the
    actionscript? What code and where do i place the code in the html
    doc where the flash is embedded? Please help

    ACTIONSCRIPT:
    on (release) {
    getURL("javascript:openNewWindow('
    myMovie.swf','thewin','height=400,width=400,toolbar=no,scrollbars=yes')
    HTML:
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=ISO-8859-1" />
    <title>--* Home Solutions Today*--</title>
    <SCRIPT LANGUAGE=JavaScript>
    function openNewWindow(URLtoOpen, windowName, windowFeatures)
    newWindow=window.open(URLtoOpen, windowName,
    windowFeatures);
    </SCRIPT>
    <script src="AC_RunActiveContent.js"
    language="javascript"></script>
    <link href="HSTPageLayout.css" rel="stylesheet"
    type="text/css">
    <style type="text/css">
    <!--
    body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    background-image: url(Stuff.jpg);
    background-repeat: repeat-x;
    background-color: #FFFFFF;
    -->
    </style>
    </head>
    <body>
    <div class="Container">
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!-- saved from url=(0013)about:internet -->
    <script language="javascript">
    if (AC_FL_RunContent == 0) {
    alert("This page requires AC_RunActiveContent.js.");
    } else {
    AC_FL_RunContent( 'codebase','
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0','widt h','700','height','850','id','Header-','align','middle','src','Header-','quality','high',' bgcolor','#336699','name','Header-','allowscriptaccess','sameDomain','allowfullscreen','fa lse','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','Header-'
    ); //end AC code
    </script>
    <noscript>
    <object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
    width="700" height="850" id="Header-" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="false" />
    <param name="movie" value="Header-.swf" /><param
    name="quality" value="high" /><param name="bgcolor"
    value="#336699" /> <embed src="Header-.swf" quality="high"
    bgcolor="#336699" width="700" height="850" name="Header-"
    align="middle" allowScriptAccess="sameDomain"
    allowFullScreen="false" type="application/x-shockwave-flash"
    pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    />
    </object>
    </noscript>
    </div>
    </body>
    </html>

  • Javascript popup in dynamic report

    Hello,
    I want to be able to use Javascript popup window from a dynamic report in Apex 4.0. Is there anything built-in to help me out? Or should I use my own javascript function in the header and call it?
    My idea would be that one column would have a icon with a link that calls a javascript function to popup a window.
    Any suggestions?
    Thanks all
    Btw, what is the markup for scripts, again?

    Try:
    javascript:popupUR

  • Javascript Popup causing flash problems

    Hi
    I have a popup window that shows up over flash, and when I
    close it the flash objects gets all weird. It stops drawing, and
    does not work properly. If I remove the javascript popup window
    from the DOM entirely everything is fine. Can someone point me to
    what I am doing wrong.
    I'm using the YUI libraries, and specifically the Dialog
    widget.
    Thanks
    A.J.

    i use this to open a new popup window
    on (release) { getURL("javascript:window.open('
    http://www.domain.com','Wname','width=950,height=600,top=20,left=20,toolbar=false,scrollba rs=yes,resizable=false,menubar=false,status=false');
    void(0);");

  • I want to insert thumbnails in my page that are links to videos in popup windows

    I can do this by a hyperlink but getting a thumbnail from the video and making it a link I am struggling with. I could sort the thumbnail out as an image, but it is the link i don't know how to do. I can't seem to get hotspots involved with the js link as in:
    <script type="text/javascript">
            // Popup window code
            function newPopup2(url) {
            popupWindow = window.open(
            url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolb ar=no,menubar=no,location=no,directories=no,status=yes')
            </script> <a href=
            "JavaScript:newPopup2('pop.htm');">Link text</a>
    This works like a charm, but I can't swap the "link text" for an thumbnail and hotspot or however it is done.
    Help would be great.

    Create a Pop-Up window in DW with the Behaviors Panel.  See link for details.
    http://alt-web.blogspot.com/2012/03/create-pop-up-window-in-dreamweaver.html
    You shouldn't need an image map for this.  A single thumbnail image (or text) can be linked to a pop-up page.
    Nancy O.

  • Resizing popup windows

    In the previous version of Safari, I could resize javascript popup windows even if they were scripted as non-resizable. In the new version I can't. Since non-resizable windows are the tool of the devil, I'm trying to find a way to disable that particular feature without disabling javascript altogether. Is there a way to do that?

    ra5ul wrote:
    edit: in the meantime, you can still resize those windows through either javascript or applescript.
    I have no idea how to do that For now I just look up the popup's url in the source and open the page manually.

Maybe you are looking for