I want a script like this How do I ? ??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lisabelle
    New Member
    • May 2006
    • 1

    I want a script like this How do I ? ??

    Really, all I've ever done is a little html, but since FrontPage, hardly any. Now I am ready to sell my products after being online for a decade. I am newly signed up with Link Partners, and I get an automated email from a site that wants to exchange links. First I look at their site. Then I realize they are a zillion miles ahead of me in the areas of forms that calculate? etc. So I viewed the source code for their order form page and whew! I have searched google, with this and that to find a script for something similar to what they have, which knocks out almost anything else I've ever seen in order forms on any sight. Can I post this here and if anyone recognizes what kind of script it is, and how to find out more about it, I would very much appreciate that. Even, suggestions on how to find scripts for forms that calculate. The script I would need would be more complex than theirs. They only sell one product in a variety of sizes, and complexity? Cause no matter how sore my "you know what gets" sitting for hours like 12 in a row trying to search for something like this code, it's about time I give up or ask for help. Here is a small snipet of the script.

    Code:
     <script language="JavaScript"> 
    <!--
     
    function calculatePrice(formobj)
    {
    	splitvalueSelect=document.shopForm.painting_type.value.split("#")
    	document.shopForm.price.value = splitvalueSelect[1]
     
    	splitvalueSelect=document.shopForm.painting_size.value.split("#")
    	document.shopForm.price.value = document.shopForm.price.value * splitvalueSelect[1]
     
    	splitvalueSelect=document.shopForm.painting_style.value.split("#")
    	document.shopForm.price.value = document.shopForm.price.value * splitvalueSelect[1]
     
    	splitvalueSelect=document.shopForm.painting_subjects_type.value.split("#")
    	document.shopForm.price.value = Math.round(document.shopForm.price.value * splitvalueSelect[1])
     
    	if (document.shopForm.price.value ==0)
    	{
    		document.shopForm.initial_price.value = ""
    	}
    	else
    	{
    		initial_payment = Math.round ( (20 * document.shopForm.price.value) / 100 )
    		document.shopForm.initial_price.value = "Note: Only need to make an initial payment of $" + initial_payment
    	}
     
    }
     
    function Form_Validator(theForm)
    {
     
     
    if (theForm.painting_type.value == "Select#0")
    {
    alert("Please Select the Painting Type");
    theForm.painting_type.focus();
    return (false);
    }
     
     
    return (true);
     
    }
     
     
     
    // -->
    </script>
     
     
    <title>Paint Your Life</title>
    <link href="css/styles.css" rel="stylesheet" type="text/css">
    <link href="css/register.css" rel="stylesheet" type="text/css">
     
     
    <style type="text/css">
     
    #fixedtipdiv{
    position:absolute;
    padding: 2px;
    border:1px solid black;
    font:normal 12px Verdana;
    line-height:18px;
    z-index:100;
    }
     
    </style>
     
    </head>
     
     
     
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
     
    <script type="text/javascript">
     
    /***********************************************
    * Fixed ToolTip script- © Dynamic Drive ([url="http://www.dynamicdrive.com/"]www.dynamicdrive.com[/url])
    * This notice MUST stay intact for legal use
    * Visit [url="http://www.dynamicdrive.com/"]http://www.dynamicdrive.com/[/url] for full source code
    ***********************************************/
     
    var tipwidth='150px' //default tooltip width
    var tipbgcolor='#EFEFEF' //tooltip bgcolor
    var disappeardelay=2000 //tooltip disappear speed onMouseout (in miliseconds)
    var vertical_offset="0px" //horizontal offset of tooltip from anchor link
    var horizontal_offset="-3px" //horizontal offset of tooltip from anchor link
     
    /////No further editting needed
     
    var ie4=document.all
    var ns6=document.getElementById&&!document.all
     
    if (ie4||ns6)
    document.write('<div id="fixedtipdiv" style="visibility:hidden;width:'+tipwidth+';background-color:'+tipbgcolor+'" ></div>')
     
    function getposOffset(what, offsettype){
    var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
    var parentEl=what.offsetParent;
    while (parentEl!=null){
    totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
    parentEl=parentEl.offsetParent;
    }
    return totaloffset;
    }
     
     
    function showhide(obj, e, visible, hidden, tipwidth){
    if (ie4||ns6)
    dropmenuobj.style.left=dropmenuobj.style.top=-500
    if (tipwidth!=""){
    dropmenuobj.widthobj=dropmenuobj.style
    dropmenuobj.widthobj.width=tipwidth
    }
    if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
    obj.visibility=visible
    else if (e.type=="click")
    obj.visibility=hidden
    }
     
    function iecompattest(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
    }
     
    function clearbrowseredge(obj, whichedge){
    var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1
    if (whichedge=="rightedge"){
    var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
    dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
    if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
    edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
    }
    else{
    var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
    dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
    if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
    edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
    }
    return edgeoffset
    }
     
    function fixedtooltip(menucontents, obj, e, tipwidth){
    if (window.event) event.cancelBubble=true
    else if (e.stopPropagation) e.stopPropagation()
    clearhidetip()
    dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
    dropmenuobj.innerHTML=menucontents
     
    if (ie4||ns6){
    showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
    dropmenuobj.x=getposOffset(obj, "left")
    dropmenuobj.y=getposOffset(obj, "top")
    dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
    dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
    }
    }
     
    function hidetip(e){
    if (typeof dropmenuobj!="undefined"){
    if (ie4||ns6)
    dropmenuobj.style.visibility="hidden"
    All I am asking is what kind of script this is and how to find something like it that I can impliment to my own needs for my own web product???????? ????
    Has anyone ever seen this kind of script? Thanx.
    Last edited by Niheel; May 7 '06, 04:46 PM.
  • Niheel
    Recognized Expert Moderator Top Contributor
    • Jul 2005
    • 2432

    #2
    It would be lot easier to explain to us in english exactly what the script that you want does instead of asking people to look at code and decipher what it does.
    niheel @ bytes

    Comment

    • mandogon
      New Member
      • Apr 2006
      • 31

      #3
      Well it looks like mostly Java Script if that is what you are looking for. if you google java script you will get some code but you will have to also use PHP to connect to your server

      Comment

      • chido
        New Member
        • Jun 2006
        • 2

        #4
        Avoid Javascript except when absolutely neccessary - SEO issues
        Do not use javascript to process your items - Display issues - could be turned off
        Look for a professional developer/consultant to discuss your ecommerce needs.

        Comment

        • ablaye
          New Member
          • Apr 2006
          • 11

          #5
          Originally posted by chido
          Avoid Javascript except when absolutely neccessary - SEO issues
          Do not use javascript to process your items - Display issues - could be turned off
          Look for a professional developer/consultant to discuss your ecommerce needs.
          I agree 100% with everything that chido said above.

          Comment

          Working...