Further questions about my site

Discussion in 'HTML' started by Josh, Jan 17, 2005.

  1. Josh

    Josh Guest

    I was wondering if anyone could point me in the direction for information to
    solve the following problems with my site (under development).

    The URL is
    http://thesouthbeachhostel.com/php-testing/default.php?p=reservations. This
    contents in this folder are not active yet. This is my first professional
    site so I want everything to be as perfect as possible.

    1) On the form there is a label "Check-in Date:" -- I want the small
    calendar icon to line up with the text field. I can't get it to line up
    perfectly.

    2) Also, I want to make a JavaScript calendar pop up when the user clicks on
    the calendar icon, which then transfers a date into the form. I don't know
    JavaScript so I was wondering if anyone knew of a good free (or very cheap)
    script that would do that function well. Is it difficult to learn to code
    something like that? I like what Travelocity.com does on their homepage but
    that might be too ambitious...

    3) How do I make a secure connection with the server to transmit the credit
    card numbers?

    4) There is a "?" icon next the the text area for "type of accommodation."
    How do I get a small popup to open when they click on that. I want to
    provide information on what the different options in the select box mean.

    Thanks in advance for any advice or resources anyone can provide.
     
    Josh, Jan 17, 2005
    #1
    1. Advertising

  2. Josh

    McKirahan Guest

    Where to start...

    "Josh" <> wrote in message
    news:...
    > I was wondering if anyone could point me in the direction for information

    to
    > solve the following problems with my site (under development).
    >
    > The URL is
    > http://thesouthbeachhostel.com/php-testing/default.php?p=reservations.

    This
    > contents in this folder are not active yet. This is my first professional
    > site so I want everything to be as perfect as possible.
    >
    > 1) On the form there is a label "Check-in Date:" -- I want the small
    > calendar icon to line up with the text field. I can't get it to line up
    > perfectly.


    Nothing appears after "Check-in Date: ".

    Your source has the following line:
    <script>DateInput('orderdate', true, 'DD-MON-YYYY')</script>
    but I couldn't find that "include" file at:
    http://thesouthbeachhostel.com/php-testing/calendarDateInput.js

    Note that as soon as I load the page I get two JavaScript Errors:

    A Runtime Error has occurred.
    Do you want to Debug?
    Line: 1
    Error: Expected ";"

    If I click "No" then I get:

    A Runtime Error has occurred.
    Do you want to Debug?
    Line: 165
    Error: Object Expected

    If I click "No" then I then the page loads.

    Debugging both errors point to the same line:
    DateInput('orderdate', true, 'DD-MON-YYYY')



    > 2) Also, I want to make a JavaScript calendar pop up when the user clicks

    on
    > the calendar icon, which then transfers a date into the form. I don't

    know
    > JavaScript so I was wondering if anyone knew of a good free (or very

    cheap)
    > script that would do that function well. Is it difficult to learn to code
    > something like that? I like what Travelocity.com does on their homepage

    but
    > that might be too ambitious...


    I'll get back to you later...

    > 3) How do I make a secure connection with the server to transmit the

    credit
    > card numbers?


    You'll need an SSL (Secure Socket Layers) ceritificate.

    > 4) There is a "?" icon next the the text area for "type of accommodation."
    > How do I get a small popup to open when they click on that. I want to
    > provide information on what the different options in the select box mean.


    Do you want your visitors to click on the "?" for the popup?

    If so, then try:

    <img src="images/question.gif" border="0" align="middle" alt="Click here for
    more information" onclick="Popup()" />

    <javascript type="text/javascript">
    function Popup() {
    var pop = "Room Types: \n";
    pop += "\n Small Mixed Dorm";
    pop += "\n Large Mixed Dorm";
    pop += "\n Female Dorm";
    pop += "\n Private Room";
    var win = window.open("","Popup","")
    win.document.write(pop);
    }
    </script>

    > Thanks in advance for any advice or resources anyone can provide.
     
    McKirahan, Jan 17, 2005
    #2
    1. Advertising

  3. Josh

    Josh Guest

    "McKirahan" <> wrote in message
    news:...
    > Where to start...
    >
    > "Josh" <> wrote in message
    > news:...
    > > I was wondering if anyone could point me in the direction for

    information
    > to
    > > solve the following problems with my site (under development).
    > >
    > > The URL is
    > > http://thesouthbeachhostel.com/php-testing/default.php?p=reservations.

    > This
    > > contents in this folder are not active yet. This is my first

    professional
    > > site so I want everything to be as perfect as possible.
    > >
    > > 1) On the form there is a label "Check-in Date:" -- I want the small
    > > calendar icon to line up with the text field. I can't get it to line up
    > > perfectly.

    >
    > Nothing appears after "Check-in Date: ".
    >
    > Your source has the following line:
    > <script>DateInput('orderdate', true, 'DD-MON-YYYY')</script>
    > but I couldn't find that "include" file at:
    > http://thesouthbeachhostel.com/php-testing/calendarDateInput.js
    >
    > Note that as soon as I load the page I get two JavaScript Errors:
    >
    > A Runtime Error has occurred.
    > Do you want to Debug?
    > Line: 1
    > Error: Expected ";"
    >
    > If I click "No" then I get:
    >
    > A Runtime Error has occurred.
    > Do you want to Debug?
    > Line: 165
    > Error: Object Expected
    >
    > If I click "No" then I then the page loads.
    >
    > Debugging both errors point to the same line:
    > DateInput('orderdate', true, 'DD-MON-YYYY')


    Sorry... I've been working on the site since I posted that message. I found
    a free calendar script on www.dynamicdrive.com that I am trying to get to
    work correctly. It was working fine but then it disappeared from my form.
    I think the script might have some bugs in it.


    > > 3) How do I make a secure connection with the server to transmit the

    > credit
    > > card numbers?

    >
    > You'll need an SSL (Secure Socket Layers) ceritificate.


    I'll search for that on Google...


    > > 4) There is a "?" icon next the the text area for "type of

    accommodation."
    > > How do I get a small popup to open when they click on that. I want to
    > > provide information on what the different options in the select box

    mean.
    >
    > Do you want your visitors to click on the "?" for the popup?
    >
    > If so, then try:
    >
    > <img src="images/question.gif" border="0" align="middle" alt="Click here

    for
    > more information" onclick="Popup()" />
    >
    > <javascript type="text/javascript">
    > function Popup() {
    > var pop = "Room Types: \n";
    > pop += "\n Small Mixed Dorm";
    > pop += "\n Large Mixed Dorm";
    > pop += "\n Female Dorm";
    > pop += "\n Private Room";
    > var win = window.open("","Popup","")
    > win.document.write(pop);
    > }
    > </script>



    Thanks for that help. I will try it out...
     
    Josh, Jan 17, 2005
    #3
  4. Josh

    McKirahan Guest

    McKirahan, Jan 17, 2005
    #4
  5. Josh

    Josh Guest


    > <img src="images/question.gif" border="0" align="middle" alt="Click here

    for
    > more information" onclick="Popup()" />
    >
    > <javascript type="text/javascript">
    > function Popup() {
    > var pop = "Room Types: \n";
    > pop += "\n Small Mixed Dorm";
    > pop += "\n Large Mixed Dorm";
    > pop += "\n Female Dorm";
    > pop += "\n Private Room";
    > var win = window.open("","Popup","")
    > win.document.write(pop);
    > }
    > </script>


    A question: I don't know much about JavaScript. Today is my first day of
    trying to use it.

    Should it be <javascript type="text/javascript">, or just <script
    type="text/javascript">? (the closing tag is </script>.)

    I added the code but it doesn't add the new lines (\n). It's a full new
    browser window. Is there anyway to resize it and remove all of the
    navigation and menu bars?

    Thanks
     
    Josh, Jan 17, 2005
    #5
  6. Josh

    McKirahan Guest

    "Josh" <> wrote in message
    news:...
    >
    > > <img src="images/question.gif" border="0" align="middle" alt="Click here

    > for
    > > more information" onclick="Popup()" />
    > >
    > > <javascript type="text/javascript">
    > > function Popup() {
    > > var pop = "Room Types: \n";
    > > pop += "\n Small Mixed Dorm";
    > > pop += "\n Large Mixed Dorm";
    > > pop += "\n Female Dorm";
    > > pop += "\n Private Room";
    > > var win = window.open("","Popup","")
    > > win.document.write(pop);
    > > }
    > > </script>

    >
    > A question: I don't know much about JavaScript. Today is my first day of
    > trying to use it.
    >
    > Should it be <javascript type="text/javascript">, or just <script
    > type="text/javascript">? (the closing tag is </script>.)
    >
    > I added the code but it doesn't add the new lines (\n). It's a full new
    > browser window. Is there anyway to resize it and remove all of the
    > navigation and menu bars?
    >
    > Thanks


    Try:

    <javascript type="text/javascript">
    function Popup() {
    var pop = "Room Types: <br>";
    pop += "<br>Small Mixed Dorm";
    pop += "<br>Large Mixed Dorm";
    pop += "<br>Female Dorm";
    pop += "<br>Private Room";
    var win = window.open("","Popup","width=200,height=200")
    win.document.write(pop);
    }
    </script>
     
    McKirahan, Jan 18, 2005
    #6
  7. Josh

    Mark Parnell Guest

    Previously in alt.html,comp.lang.javascript, Josh <>
    said:

    > Should it be <javascript type="text/javascript">, or just <script
    > type="text/javascript">? (the closing tag is </script>.)


    <script type="text/javascript">. There is no <javascript> element.

    > I added the code but it doesn't add the new lines (\n). It's a full new
    > browser window. Is there anyway to resize it and remove all of the
    > navigation and menu bars?


    Yes.

    http://diveintoaccessibility.org/day_16_not_opening_new_windows.html

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Jan 18, 2005
    #7
  8. Josh

    McKirahan Guest

    "Mark Parnell" <> wrote in message
    news:qs91vhesxuai.15vz5nb2egwlb$...
    > Previously in alt.html,comp.lang.javascript, Josh <>
    > said:
    >
    > > Should it be <javascript type="text/javascript">, or just <script
    > > type="text/javascript">? (the closing tag is </script>.)

    >
    > <script type="text/javascript">. There is no <javascript> element.
    >
    > > I added the code but it doesn't add the new lines (\n). It's a full

    new
    > > browser window. Is there anyway to resize it and remove all of the
    > > navigation and menu bars?

    >
    > Yes.
    >
    > http://diveintoaccessibility.org/day_16_not_opening_new_windows.html
    >
    > --
    > Mark Parnell
    > http://www.clarkecomputers.com.au


    Mark's right -- my pseudo code was wrong.

    Even when I first read your question about it I didn't spot the difference.

    Thanks Mark.
     
    McKirahan, Jan 18, 2005
    #8
  9. Josh

    Toby Inkster Guest

    Toby Inkster, Jan 18, 2005
    #9
  10. Josh

    Josh Guest

    Josh, Jan 18, 2005
    #10
  11. Josh

    Josh Guest

    "McKirahan" <> wrote in message
    news:...
    > "Josh" <> wrote in message
    > news:...



    I tried this and it works, but the popup seems to be perpetually loading.
    The mouse shows an hourglass when hovering over the popup.

    <script type="text/javascript">
    function Popup() {
    var pop = "Room Types: <br>";
    pop += "<br>Small Mixed Dorm";
    pop += "<br>Large Mixed Dorm";
    pop += "<br>Female Dorm";
    pop += "<br>Private Room";
    var win = window.open("","Popup","width=200,height=200")
    win.document.write(pop);
    }
    </script>
     
    Josh, Jan 18, 2005
    #11
  12. Josh

    McKirahan Guest

    "Josh" <> wrote in message
    news:...
    > "McKirahan" <> wrote in message
    > news:...
    > > "Josh" <> wrote in message
    > > news:...

    >
    >
    > I tried this and it works, but the popup seems to be perpetually loading.
    > The mouse shows an hourglass when hovering over the popup.
    >
    > <script type="text/javascript">
    > function Popup() {
    > var pop = "Room Types: <br>";
    > pop += "<br>Small Mixed Dorm";
    > pop += "<br>Large Mixed Dorm";
    > pop += "<br>Female Dorm";
    > pop += "<br>Private Room";
    > var win = window.open("","Popup","width=200,height=200")
    > win.document.write(pop);
    > }
    > </script>



    Don't know about that; it doesn't for me.
     
    McKirahan, Jan 18, 2005
    #12
  13. Josh

    Josh Guest

    "McKirahan" <> wrote in message
    news:D...
    > "Josh" <> wrote in message
    > news:...
    > > "McKirahan" <> wrote in message
    > > news:...
    > > > "Josh" <> wrote in message
    > > > news:...

    > >
    > >
    > > I tried this and it works, but the popup seems to be perpetually

    loading.
    > > The mouse shows an hourglass when hovering over the popup.
    > >
    > > <script type="text/javascript">
    > > function Popup() {
    > > var pop = "Room Types: <br>";
    > > pop += "<br>Small Mixed Dorm";
    > > pop += "<br>Large Mixed Dorm";
    > > pop += "<br>Female Dorm";
    > > pop += "<br>Private Room";
    > > var win = window.open("","Popup","width=200,height=200")
    > > win.document.write(pop);
    > > }
    > > </script>

    >
    >
    > Don't know about that; it doesn't for me.


    Hmm... I wonder what it could be. In any case I just bought two books on
    JavaScript today. I guess I have to study some more. There is so much to
    learn and not much time...

    Thanks for your help.
     
    Josh, Jan 20, 2005
    #13
  14. Josh

    Grant Wagner Guest

    "Josh" <> wrote in message
    news:...
    > "McKirahan" <> wrote in message
    > news:...
    >> "Josh" <> wrote in message
    >> news:...

    >
    >
    > I tried this and it works, but the popup seems to be perpetually
    > loading.
    > The mouse shows an hourglass when hovering over the popup.
    >
    > <script type="text/javascript">
    > function Popup() {
    > var pop = "Room Types: <br>";
    > pop += "<br>Small Mixed Dorm";
    > pop += "<br>Large Mixed Dorm";
    > pop += "<br>Female Dorm";
    > pop += "<br>Private Room";
    > var win = window.open("","Popup","width=200,height=200")
    > win.document.write(pop);
    > }
    > </script>


    Don't rely on the new window being open and ready for writing when you
    call document.write(). The following code will work more reliably (in
    browsers where you can actually open a new window at any rate):

    <script type="text/javascript">
    window.newWindowHtml = [
    "Room Types:<br>",
    "Small Mixed Dorm",
    "Large Mixed Dorm",
    "Female Dorm",
    "Private Room"
    ].join('<br>');

    var win = window.open(
    "javascript:eek:pener.newWindowHtml",
    "winName",
    "width=200,height=200"
    );
    </script>

    It's not a bad idea to write 100% valid HTML to the new window, even if
    you're doing it via script:

    window.newWindowHtml = [
    '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',
    '<html>',
    '<head>',
    '<title>Untitled</title>',
    '</head>',
    '<body>',
    'Your content here',
    '</body>',
    '</html>'
    ].join('\n');

    --
    Grant Wagner <>
    comp.lang.javascript FAQ - http://jibbering.com/faq
     
    Grant Wagner, Jan 20, 2005
    #14
  15. Josh

    McKirahan Guest

    "Grant Wagner" <> wrote in message
    news:EMTHd.111$...
    > "Josh" <> wrote in message
    > news:...
    > > "McKirahan" <> wrote in message
    > > news:...
    > >> "Josh" <> wrote in message
    > >> news:...

    > >
    > >
    > > I tried this and it works, but the popup seems to be perpetually
    > > loading.
    > > The mouse shows an hourglass when hovering over the popup.
    > >
    > > <script type="text/javascript">
    > > function Popup() {
    > > var pop = "Room Types: <br>";
    > > pop += "<br>Small Mixed Dorm";
    > > pop += "<br>Large Mixed Dorm";
    > > pop += "<br>Female Dorm";
    > > pop += "<br>Private Room";
    > > var win = window.open("","Popup","width=200,height=200")
    > > win.document.write(pop);
    > > }
    > > </script>

    >
    > Don't rely on the new window being open and ready for writing when you
    > call document.write(). The following code will work more reliably (in
    > browsers where you can actually open a new window at any rate):
    >
    > <script type="text/javascript">
    > window.newWindowHtml = [
    > "Room Types:<br>",
    > "Small Mixed Dorm",
    > "Large Mixed Dorm",
    > "Female Dorm",
    > "Private Room"
    > ].join('<br>');
    >
    > var win = window.open(
    > "javascript:eek:pener.newWindowHtml",
    > "winName",
    > "width=200,height=200"
    > );
    > </script>
    >
    > It's not a bad idea to write 100% valid HTML to the new window, even if
    > you're doing it via script:
    >
    > window.newWindowHtml = [
    > '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',
    > '<html>',
    > '<head>',
    > '<title>Untitled</title>',
    > '</head>',
    > '<body>',
    > 'Your content here',
    > '</body>',
    > '</html>'
    > ].join('\n');
    >
    > --
    > Grant Wagner <>
    > comp.lang.javascript FAQ - http://jibbering.com/faq


    I like it; thanks Grant.

    <html>
    <head>
    <title>popupper.htm</title>
    <script type="text/javascript">
    function Popup() {
    window.newWindowHtml = [
    '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',
    '<html>',
    '<head>',
    '<title>Untitled</title>',
    '</head>',
    '<body>',
    'Room Types:',
    '<li>Small Mixed Dorm',
    '<li>Large Mixed Dorm',
    '<li>Female Dorm',
    '<li>Private Room',
    '</body>',
    '</html>'
    ].join('\n');
    var win = window.open(
    "javascript:eek:pener.newWindowHtml",
    "winName",
    "width=200,height=200"
    );
    }
    </script>
    </head>
    <body>
    <a href="javascript:popup()">Popup</a>
    </body>
    </html>
     
    McKirahan, Jan 20, 2005
    #15
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason
    Replies:
    2
    Views:
    2,571
    =?Utf-8?B?U3RldmUgSw==?=
    Jun 10, 2004
  2. Gopal Krish

    Stop further execution in Page_Load

    Gopal Krish, Oct 24, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    13,140
    Gopal Krish
    Oct 25, 2004
  3. Brent White
    Replies:
    8
    Views:
    660
    S. Justin Gengo
    Oct 26, 2005
  4. Talin
    Replies:
    1
    Views:
    283
    Bruno Desthuilliers
    Aug 21, 2005
  5. Mark C
    Replies:
    0
    Views:
    355
    Mark C
    Feb 2, 2007
Loading...

Share This Page