Jump to content

Rubiconlwb

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by Rubiconlwb

  1. I have many pages that have the old tag 'align="center"' and since I am trying to update to HTML 5 code I've been trying to figure out how to do that in another manner. This method still seems to work but I'm sure it's only time until it won't. I did lots of research and came up with methods such as margin:auto and several others but none seem to work. Are there any suggestions on what I could be doing wrong? I put this in my .css file .center { margin: auto; width: 90%; } Then I used this in the body of my document: <div class="center"> <content> </div> This did not center the content
  2. What command would I use other than document.write()? I'm always trying to learn better ways of doing things.
  3. I will try to clean the code up using the validator. I don't know what you mean by 'strict' code so will go check it out using your link. Thanks for you help. As you can probably tell, I am completely self-taught so I'm sure I do a lot of things much more tediously than one who does this professionally or at least has some academic training.
  4. I experimented with this code long enough that I solved my own problem! I don't know what was wrong but I eventually removed the function and transferred to code from the function into the loop in the body of the page and it worked! I must have been using a variable that had not been defined or something but at any rate the form is working the way I want it to. Thanks so much for attempting to assist in my frustrating problem!
  5. The problem is not generating a total, the code does that fine. The problem is that when I fill out the form, putting a number in one or more boxes on the form indicating I want to order that item, I receive the order just fine. All the information submitted is sent as well but it does not send the name of the item nor the number ordered. The part that should take care of sending that data is the ...document.write("<input name='"+name[i]+"' size=2></td></tr>");/* the qty field */... Also, I created a .ssi file than contains all the data on the arrays and use an include such as <!--#include virtual="/ssifiles/pricetable.ssi" --> to bring that into the code Here is a link to the page in question: http://sawdustunlimited.net/order.shtml
  6. That is included in the code for the page but has nothing to do with the form operation so I did not include it. Would it be helpful if I included the entire code for the page? I'm pretty much stumped because the page presents well on the webpage and all other entries are sent via the formtoemailpro.php program to my e-mail address except for the information pertaining to any items ordered. Here is the variable declaration section: var header="Papa's Order Page"; var notoc=0; var fontnumber=0; //font number of page header var countfile="suorder"; //used for page counter var showaddbookmark=1; //if 1 then print note about bookmarking var coupon=1; //Change this to 1 to present alert about using a coupon var counter=1; var pictures=1; var total=0;
  7. So you don't see anything wrong with my code? Originally, I had the below included in the function but moved it out of the function thinking maybe that would help but it made no difference. document.write("<input name='"+name+"' size=2></td></tr>"); As you can probably tell, I'm self taught in javascript and certainly not an expert but can usually figure out how to get things to work. This has me stumped!
  8. I have created an order form where users can place orders. Everything is working except for the number of items ordered is not being relayed as it should. Below is the appropriate code. When this is submitted, all data input such and name, address, e-mail address, etc. but I don't get the name of the item ordered or how many were ordered. Any suggestions? function PrintItem(number,photo,item,price) { var formatprice="$"+price+".00" if(photo===1){ document.write("<tr style='background-color:tan;'>"); } else{ document.write("<tr style='background-color:deepskyblue;'>"); } document.write("<td>"+counter+"</td><td>"+item+"</td><td>"+number+"</td><td align='right'>"+formatprice+"</td>"); if(number>0){ document.write("<td align='right'>Buy:"); } else{ document.write("<td align='right'>Order:"); } counter++; total=total+number; } <form action="formtoemailpro.php" method="post" onsubmit="return formCheck(this);"> <input type="hidden" name="Form" value="Papa's Order Form" /> <table width="700" border=4 bgcolor="black" cellpadding=5 cellspacing=0 style="box-shadow: 10px 10px 5px darkslategray;" summary="Main"> <tr><td> <table border=4 width=100% bgcolor="tan" cellpadding=10> <tr><td style="text-align:justify; font-size:16px;">If an item has a tan background, there is a photo associated with that item. To see a photo of any item, click the 'Photos' button in the menu above. I can customize any item I make by woodburning on the item (such as your name or your favorite team) for an additional charge of $2.00 per item. To order any item, enter your personal info below and then enter a quantity in one or more boxes and click 'Submit'. If any item indicates there are none 'On Hand', you can order that item but it will take more time to receive the item since I will have to make it before it is available. If you include a PayPal e-mail address, you are agreeing for me to charge your paypal account and I will send you an invoice via PayPal. If you don't have a PayPal account or want to pay by money order, I will e-mail you an invoice so you can send me a money order (no checks please). If you can pick up the item, you can avoid postage charges. If I have to mail it to you, I will charge exact postage.</td></tr> </table> <table width=100% border=4 bgcolor="deepskyblue" cellpadding=5 cellspacing=0> <tr><td colspan=2>Name:</td><td colspan=3 align="right"><input name="name" size=40></td></tr> <tr><td colspan=2>Address:</td><td colspan=3 align="right"><input name="address" size=40></td></tr> <tr><td colspan=2>City/State:</td><td colspan=3 align="right"><input name="city/state" size=40></td></tr> <tr><td colspan=2>Zip Code:</td><td colspan=3 align="right"><input name="zip" size=40></td></tr> <tr><td colspan=2>Phone:</td><td colspan=3 align="right"><input name="phone" size=40></td></tr> <tr><td colspan=2>E-mail:</td><td colspan=3 align="right"><input name="email" size=40></td></tr> <tr align="center"><th width=50>#</th><th width=480>Description</th><th width=50>On Hand</th><th width=50>Price</th><th width=70>To Order</th></tr> <script> //PrintItem(number,photo,item,price,shortname); for (i = 0; i < price.length; i++) { if (category!=="") { document.write("<tr><td colspan=5 align='center' style='background-color:gray;'>"+category+"</td></tr>"); } PrintItem(onhand,photo,project,price); document.write("<input name='"+name+"' size=2></td></tr>"); } document.write("<tr style='background-color:lightblue;'><td colspan=2 style='text-align:right;'>Total items on hand:</td><td colspan=3 style='text-align:left;'>"+total+"</td></tr>"); </script> <tr><td colspan=2>Text you want woodburned ($2.00 extra):</td><td colspan=3><input type="text" name="Woodburn text" size=39 /></td></tr> <tr><td colspan=2>PayPal e-mail:</td><td colspan=3><input type="text" name="PayPal" size=39 /></td></tr> <script> if (coupon==1){ document.write("<tr><td colspan=2>Coupon:</td><td colspan=3><input type='text' name='Coupon' size=39 /></td></tr>"); } </script> <tr><td colspan=2>Comments:</td><td colspan=3><textarea name="Comment" rows="5" cols="30"></textarea></td></tr> <tr align="left"><td colspan=2 valign="top">Security code:</td><td style="font-size:12px; text-align:center;" colspan=3><img id="captcha" src="/securimage/securimage_show.php" alt="CAPTCHA Image"><a href="#" style="background:deepskyblue;" onclick="document.getElementById('captcha').src = '/securimage/securimage_show.php?' + Math.random(); return false"><br>Reload Image</a></td></tr> <tr align="left"><td colspan=2>Retype code:</td><td align="center" colspan=3><input type="text" name="captcha_code" size="25" maxlength="6"></td></tr> <TR><td colspan=2> </td><TD ALIGN=CENTEr VALIGN=TOP colspan=3><input type="submit" value="Submit" /> <input type="reset" value="Reset" /></TD></tr> </table> </td></tr> </table> </form>
  9. Thank you so much Ingolme, what you pointed out was exactly what the problem was. I thought I had done every bit of troubleshooting possible to isolate the problem but obviously I missed the misspelling. I also had the same problem on the element before the last one (I copied this element to create the new element). Once I corrected those errors, it worked fine. I can't tell you what a load that is off of my mind. I probably could have looked at the code for another week before picking out the improper spelling. Once again, thanks a ton! I'm now back on track.
  10. I have a website where I defined a number of items with variables that represent name, price, items on hand, photo taken, etc. All has worked well until I reached the magical number of 42 items. When I define that 42nd item I get undefined instead of the correct info. Do I need to define the number of items that will be in the array before creating them? Below is the routine that I use to show the photos with the appropriate info shown. function PrintLeft(url,item,price){ document.write("<tr style='text-align:center;'><td>"+url+item+" ($"+price+".00)</td>");}function PrintRight(url,item,price){ if(url===""){ document.write("<td>New Item Coming Soon!</td></tr>"); } else { document.write("<td>"+url+item+" ($"+price+".00)</td></tr>"); }} var left=41;PrintLeft("<img src='/pictures/Toothpick holder.jpg' width='400' height='266' alt='"+shortname +"' title='"+shortname +"'/>",project ,price );var right=42;PrintRight("<img src='/pictures/Round wood box.jpg' width='400' height='266' alt='"+shortname +"' title='"+shortname +"' />",project ,price ); I defined the arrays like this: //itemcounter=42project[itemcounter] = "Round wooden box with lid";price[itemcounter]=6;onhand[itemcounter]=2;photo[itemcountedr]=1;shortname[itemcounter]="roundbox";itemcounter++ I'm pretty new to javascript arrays and completely self taught so my techniques may be a little rough but any suggestions appreciated
  11. I followed the suggestions given in the link and it worked! Thanks so much for the assistance. I spent a couple hours searching google for a solution and came up with nothing that worked. Lots of suggestions but nothing that actually worked. I came up with one solution that downloaded a file, just not the one I wanted downloaded! LOL
  12. I would like to be able to have my users download a .gpx file which I have on the website server. I have successfully done this in the past with a .zip file and utilizing the window.open method but when I tried that with this file, all I get is another webpage with all the data shown, it does not actually download the file. I am not technically advanced even though I have been creating and maintaining websites for several years. I did some research on the internet and tried several things that were suggested, some did the same thing and others did not work at all. Any suggestions? I am willing to try anything. Is there something special about this type of file? Below is my recollection of the process I used. <input type="button" value="Download" onclick="window.open('wfrawlins.gpx')"> Any help you can give would be greatly appreciated
  13. Why can I not start a new topic

  14. Why can I not start a new topic

×
×
  • Create New...