Coding Help HTML ->JS->PDF

Posted on 2010-01-04
Last Modified: 2012-05-08
I have a website that I am building to benefit students in my school district.  I write the pages by hand in HTML and PHP.  I have a few Perl scripts worked in the mix too.  I'm no expert, but know a lot more than the common Joe.  My menu is created using AllWebMenus Lite version and seems to be javascript.  I have  a menu link that loads a PDF file.  I need an alert box to popup with a disclaimer prior to the pdf file loading.  How would this be done?
Question by:Larkdog
    LVL 17

    Accepted Solution

    Pop up an alert box with the disclaimer and then modify the location of the current page to point at the pdf sounds like the easiest solution.

    Author Comment

    something like the following?

    menu link to a page that has only two items; 1] the alert, and 2] meta refresh=0

    and the meta refresh redirects to the pdf.  that's pretty simple.  i must have just had a brain fart or something.  or i was trying to make it too hard.

    LVL 17

    Expert Comment

    lol... ro just use window.location = ""
    when you get control back after the alert()

    Expert Comment


    We are afraid the above solution is the only one that would work for the LITE version.

    If you get AllWebMenus PRO however, you are allowed to add JavaScript code directly to the menu item.

    With this, you can show an alert box (or even confirmation box) while still in the same page, and then redirect to the next only if the user wants to.

    You can do so, by adding the following code to the JavaScript code property of the onclick state of your item:

    if (confirm("Do you want to show the pdf?")) window.location = "";

    or if you want an alert, just:

    alert("You will now see a pdf."); window.location = "";

    Author Comment

    interesting finding Likno Software here at Experts-exchange.  Using the alert is the best option for my case b/c it allows me to put a disclaimer up before the person proceeds.  I do like Likno though!  Its the easiest thing I've found so far.

    Expert Comment

    We are here to help - if anything please do not hesitate to contact us (you can also do so directly at support [AT] likno [DOT] com.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
    This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
    In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
    In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now