Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2011
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    eBay Template Form Help!!

    Hi

    I am new here so please bare with me.

    I have designed an eBay Template and have been using it for over a year.

    I have just decided to revamp it. As part of this i am trying to build a form where someone with no knowledge of html, css or dreamweaver etc. Can fill in this form and it will automaticaly fill in details such as:

    Title, Item Condition, postage, description, addresses for pictures on the server etc.

    I want to do this so i can design templates for family that have no computer knowledge and possibly in the long term future distribute this along with custom template designs.

    I have so far designed the form and have java script which adds the info. However i am unsure whether this is the best route. I have seen similar designs done in php.

    Can someone please advise on the best route to approach this??

    I am having a couple problems with the javascript approach:

    1. Unordered lists within the item description. My template uses bullet points as the description. I have managed to get the descrition points from the form however bullet points still display even if nothing has been entered by the user. This looks unitdy.

    2. Once the form has been submitted the page is created and looks as it should be. However when i copy this into ebay or even a new dreamweaver document then all the filled information is listed as "undefined". I want the submission of the form to create a new document with the hard coded info entered by the user not just for display purposes there and then.

    My code is as follows:

    Form Code:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Pass Data Form</title>
    <BODY>
    
    <center>
    <form type=get action="template.htm">
    <table border=1>
    <tr>
    <td>Item Title:</td>
    <td><input type=text name=itemtitle size=100></td>
    </tr>
    <tr>
    <td>Item Condition:</td>
    <td><input type=text name=itemcondition size=50></td>
    </tr>
    <tr>
    <td>Box Condition:</td>
    <td><input type=text name=boxcondition size=50></td>
    </tr>
    <tr>
    <td>UK Postage:</td>
    <td><input type=text name=ukpostage size=10></td>
    </tr>
    <tr>
    <td>European Postage:</td>
    <td><input type=text name=europepost size=10></td>
    </tr>
    <tr>
    <td>Rest Of World Postage:</td>
    <td><input type=text name=rowpostage size=10></td></tr>
    <tr>
    <td>Description Item 1:</td>
    <td><input type=text name=descritionitem1 size=100></td>
    </tr>
    <tr>
    <td>Description Item 2:</td>
    <td><input type=text name=descritionitem2 size=100></td>
    </tr>
    <tr>
    <td>Description Item 3:</td>
    <td><input type=text name=descritionitem3 size=100></td>
    </tr>
    <tr>
    <td>Description Item 4:</td>
    <td><input type=text name=descritionitem4 size=100></td>
    </tr>
    <tr>
    <td>Description Item 5:</td>
    <td><input type=text name=descritionitem5 size=100></td>
    </tr>
    <tr>
    <td>Description Item 6:</td>
    <td><input type=text name=descritionitem6 size=100></td>
    </tr>
    <tr>
    <td>Description Item 7:</td>
    <td><input type=text name=descritionitem7 size=100></td>
    </tr>
    <tr>
    <td>Description Item 8:</td>
    <td><input type=text name=descritionitem8 size=100></td>
    </tr>
    <tr>
    <td>Description Item 9:</td>
    <td><input type=text name=descritionitem9 size=100></td>
    </tr>
    <tr>
    <td>Description Item 10:</td>
    <td><input type=text name=descritionitem10 size=100></td>
    </tr>
    <tr>
    <td>Description Item 11:</td>
    <td><input type=text name=descritionitem11 size=100></td>
    </tr>
    <tr>
    <td>Description Item 12:</td>
    <td><input type=text name=descritionitem12 size=100></td>
    </tr>
    <tr>
    <td colspan=2><input type=submit value="Submit!">
    </td>
    </tr>
    </table>
    </form>
    </center>
    
    
    </head>
    
    <body>
    </body>
    </html>
    template codes to display the info:

    Code:
    <SCRIPT LANGUAGE="JavaScript">
    
    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    
    <!-- Begin
    function getParams() {
    var idx = document.URL.indexOf('?');
    var params = new Array();
    if (idx != -1) {
    var pairs = document.URL.substring(idx+1, document.URL.length).split('&');
    for (var i=0; i<pairs.length; i++) {
    nameVal = pairs[i].split('=');
    params[nameVal[0]] = nameVal[1];
       }
    }
    return params;
    }
    params = getParams();
    //  End -->
    </script>
    </HEAD>
    
    <DIV align=center><FONT color=#492d67><STRONG>&nbsp; 
    											<SCRIPT LANGUAGE="JavaScript">
    											itemtitle = unescape(params["itemtitle"]).replace(/\+/g,' ');
    											document.write(itemtitle); </script> </STRONG></FONT></DIV>                                      
                                                &nbsp;</DIV>
                                                <DIV align=left><FONT color=#492d67><STRONG>&nbsp; 
    											<SCRIPT LANGUAGE="JavaScript">
    											itemcondition = unescape(params["itemcondition"]).replace(/\+/g,' ');
    											document.write("ITEM CONDITION: " + itemcondition); </script> </STRONG></FONT></DIV>
                                                <DIV align=left><FONT color=#492d67></FONT>&nbsp;</DIV>
                                                <DIV align=left><FONT color=#492d67><STRONG>&nbsp; 
    											<SCRIPT LANGUAGE="JavaScript">
    											boxcondition = unescape(params["boxcondition"]).replace(/\+/g,' ');
    											document.write("BOX CONDITION: " + boxcondition); </script></STRONG></FONT>&nbsp;</DIV>
    											<DIV align=left><FONT color=#492d67></FONT>&nbsp;</DIV>
    											<DIV align=left><FONT color=#492d67><STRONG>&nbsp; 
    											<SCRIPT LANGUAGE="JavaScript">
    											ukpostage = unescape(params["ukpostage"]).replace(/\+/g,' ');
    											europepost = unescape(params["europepost"]).replace(/\+/g,' ');
    											rowpostage = unescape(params["rowpostage"]).replace(/\+/g,' ');
    											document.write("POSTAGE: " + ukpostage + " (UK Mainland) " + europepost + " (Europe) " + rowpostage + " (R.O.W) " ); </script></STRONG></FONT>&nbsp;</DIV>
    											<DIV align=left></DIV>
                                                <UL>
                                                  <LI>
                                                    <DIV align=left><FONT color=#492d67>
    												<SCRIPT LANGUAGE="JavaScript">
    											descritionitem1 = unescape(params["descritionitem1"]).replace(/\+/g,' ');											
    											document.write(descritionitem1); </script>
    											<br>
    											<LI>
    											<DIV align=left><FONT color=#492d67>
    											<SCRIPT LANGUAGE="JavaScript">
    											descritionitem2 = unescape(params["descritionitem2"]).replace(/\+/g,' ');
    											document.write(descritionitem2); </script>
    											<br>
    											<LI>
    											<DIV align=left><FONT color=#492d67>
    											<SCRIPT LANGUAGE="JavaScript">
    											descritionitem3 = unescape(params["descritionitem3"]).replace(/\+/g,' ');
    											document.write(descritionitem3); </script>		
    											<br>
    											<LI>
    											<DIV align=left><FONT color=#492d67>
    											<SCRIPT LANGUAGE="JavaScript">
    											descritionitem4 = unescape(params["descritionitem4"]).replace(/\+/g,' ');
    											document.write(descritionitem4); </script>		
    											<br>
    											<LI>
    											<DIV align=left><FONT color=#492d67>
    											<SCRIPT LANGUAGE="JavaScript">
    											descritionitem5 = unescape(params["descritionitem5"]).replace(/\+/g,' ');
    											document.write(descritionitem5); </script>		
    											<br>
    											<LI>
    											<DIV align=left><FONT color=#492d67>
    											<SCRIPT LANGUAGE="JavaScript">
    											descritionitem6 = unescape(params["descritionitem6"]).replace(/\+/g,' ');
    											document.write(descritionitem6); </script>		
    											<br>
    											<LI>
    											<DIV align=left><FONT color=#492d67>
    											<SCRIPT LANGUAGE="JavaScript">
    											descritionitem7 = unescape(params["descritionitem7"]).replace(/\+/g,' ');
    											document.write(descritionitem7); </script>		
    											<br>
    											<LI>
    											<DIV align=left><FONT color=#492d67>
    											<SCRIPT LANGUAGE="JavaScript">
    											descritionitem8 = unescape(params["descritionitem8"]).replace(/\+/g,' ');
    											document.write(descritionitem8); </script>		
    											<br>
    											<LI>
    											<DIV align=left><FONT color=#492d67>
    											<SCRIPT LANGUAGE="JavaScript">
    											descritionitem9 = unescape(params["descritionitem9"]).replace(/\+/g,' ');
    											document.write(descritionitem9); </script>		
    											<br>
    											<LI>
    											<DIV align=left><FONT color=#492d67>
    											<SCRIPT LANGUAGE="JavaScript">
    											descritionitem10 = unescape(params["descritionitem10"]).replace(/\+/g,' ');
    											document.write(descritionitem10); </script>		
    											<br>
    											<LI>
    											<DIV align=left><FONT color=#492d67>
    											<SCRIPT LANGUAGE="JavaScript">
    											descritionitem11 = unescape(params["descritionitem11"]).replace(/\+/g,' ');
    											document.write(descritionitem11); </script>		
    											<br>
    											<LI>
    											<DIV align=left><FONT color=#492d67>
    											<SCRIPT LANGUAGE="JavaScript">
    											descritionitem12 = unescape(params["descritionitem12"]).replace(/\+/g,' ');
    											document.write(descritionitem12); </script>
    Sorry for the long post and thanks in advance.

  • #2
    Mr.
    Mr. is offline
    Regular Coder
    Join Date
    Feb 2011
    Posts
    112
    Thanks
    8
    Thanked 4 Times in 4 Posts
    ebay does not allow javascript...

  • #3
    New Coder
    Join Date
    Oct 2011
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Mr. View Post
    ebay does not allow javascript...
    I am fully aware that ebay does not allow javascript.

    I am trying to create a html/php form which will update my ebay template offline. The user will then use the source code, containing no javascript, of this newly created template containg all the inputted info add it as their item description. This will allow a user to update a template without picking around with the code etc.


  •  

    Posting Permissions

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