Preview button for a News Manager RRS feed

  • Question

  • User-108969407 posted
    Hi all [;)]
    I created a News manager with ASP
    in Post News Page I have 2 button first one "Publish" and second is "Preview News" like this forum,

    the problem,

    I have a page with this name "dostuff.asp" this page is for posting news ,
    I am using this javascript code for previewing News in a popup window
    the page for previewing news is a section of dostuff.asp

    <script language="JavaScript">

    function preview()


    document.postnews.action.value = 'preview';





    when I click on Preview button every thing is ok and it will show me the preview of News ,
    But when I close the preview window and  click on publish button it will open preview window again,

    Its something like a history for javascript after clicking on preview button it will store file address in somewhere and after I click on the publish it will open stored address of file

    what is the solution for this problem?
    I uesd this code but I get an error

    function publish()

    document.postnews.action.value = 'post';




    this error:
    Object doesn't support this property or method
    the line 150 line 150 is this

    <input type="button" value="Preview" name="B3" onclick="publish()">

    where I call the function
    Thursday, April 21, 2005 6:52 PM

All replies

  • User-823196590 posted
    This is actually a client-side javascript question and you may get a better answer in a more relevant forum ...
    Friday, April 22, 2005 8:42 AM