Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006
    Location
    wv
    Posts
    21
    Plugin Contributions
    0

    Default How to properly implement jscript_*.php file for main page?

    Hello all,

    I'm trying to insert an image into the main page, ABOVE the "welcome" text....so on the index.php page. BUT, I need for that image to be clickable to open a pop-up window for a survey form.

    In trying to follow the documentation for using jscript file while "page specific" and included, not linked to...I'm afraid I'm a little lost. The directions leave out details that someone not familiar with jscript wouldn't know. For instance:

    In testing my javascript on external pages (works fine), I've got this code around my image on the survey test page (Click the link if you want to see what I'm trying to make happen):

    Code:
    <div align="center"><a href="http://www.thesoappeddler.com/survey_01.html" onclick="NewWindow(this.href,'Survey','650','550','yes','center');return false" onfocus="this.blur()"><img src='http://www.thesoappeddler.com/images/survey_soap_468x60.gif' alt="FREE SOAP when you take our survey!" width="468" height="60" border=0></a></div>
    Do I still insert this code "as is" into the index.php file where I want the image to be? And for naming the jscript file, I went with jscript_survey.php because I didn't see info on what, if anything I needed to use for the filename. But my head tells me this needs to match an existing reference somewhere?

    I'm sorry for the dumb question. I realize jscript is very vanilla to most of you guys, but personally I think I'd rather play with php and html. Thanks in advance for any insight.
    Michelle B
    The Soap Peddler - Homemade Goat milk soaps, Beer soaps, Coconut milk soaps, Cocoa butter tub truffles & more!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: How to properly implement jscript_*.php file for main page?

    Quote Originally Posted by webwiz View Post
    Code:
    <div align="center"><a href="http://www.thesoappeddler.com/survey_01.html" onclick="NewWindow(this.href,'Survey','650','550','yes','center');return false" onfocus="this.blur()"><img src='http://www.thesoappeddler.com/images/survey_soap_468x60.gif' alt="FREE SOAP when you take our survey!" width="468" height="60" border=0></a></div>
    Do I still insert this code "as is" into the index.php file where I want the image to be?
    Yes.
    Quote Originally Posted by webwiz View Post
    And for naming the jscript file, I went with jscript_survey.php
    That's fine. You'll see in your browser's page source that the file contents is being included.

    Ref: http://www.zen-cart.com/wiki/index.p...s_-_Javascript
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. How to implement an external stylesheet for my menu?
    By zingslings in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 27 Apr 2009, 11:53 PM
  2. Main Page Doesn't Display Properly ?
    By 1001digital in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 26 Mar 2009, 09:57 AM
  3. Setting file permissions for main page
    By Webartist in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 27 Feb 2009, 08:54 AM
  4. Main page not displaying properly
    By bwhitmire in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 28 Jul 2006, 11:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg