473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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.

Expand|Select|Wrap|Line Numbers
  1.  <script language="JavaScript"> 
  2. <!--
  3.  
  4. function calculatePrice(formobj)
  5. {
  6.     splitvalueSelect=document.shopForm.painting_type.value.split("#")
  7.     document.shopForm.price.value = splitvalueSelect[1]
  8.  
  9.     splitvalueSelect=document.shopForm.painting_size.value.split("#")
  10.     document.shopForm.price.value = document.shopForm.price.value * splitvalueSelect[1]
  11.  
  12.     splitvalueSelect=document.shopForm.painting_style.value.split("#")
  13.     document.shopForm.price.value = document.shopForm.price.value * splitvalueSelect[1]
  14.  
  15.     splitvalueSelect=document.shopForm.painting_subjects_type.value.split("#")
  16.     document.shopForm.price.value = Math.round(document.shopForm.price.value * splitvalueSelect[1])
  17.  
  18.     if (document.shopForm.price.value ==0)
  19.     {
  20.         document.shopForm.initial_price.value = ""
  21.     }
  22.     else
  23.     {
  24.         initial_payment = Math.round ( (20 * document.shopForm.price.value) / 100 )
  25.         document.shopForm.initial_price.value = "Note: Only need to make an initial payment of $" + initial_payment
  26.     }
  27.  
  28. }
  29.  
  30. function Form_Validator(theForm)
  31. {
  32.  
  33.  
  34. if (theForm.painting_type.value == "Select#0")
  35. {
  36. alert("Please Select the Painting Type");
  37. theForm.painting_type.focus();
  38. return (false);
  39. }
  40.  
  41.  
  42. return (true);
  43.  
  44. }
  45.  
  46.  
  47.  
  48. // -->
  49. </script>
  50.  
  51.  
  52. <title>Paint Your Life</title>
  53. <link href="css/styles.css" rel="stylesheet" type="text/css">
  54. <link href="css/register.css" rel="stylesheet" type="text/css">
  55.  
  56.  
  57. <style type="text/css">
  58.  
  59. #fixedtipdiv{
  60. position:absolute;
  61. padding: 2px;
  62. border:1px solid black;
  63. font:normal 12px Verdana;
  64. line-height:18px;
  65. z-index:100;
  66. }
  67.  
  68. </style>
  69.  
  70. </head>
  71.  
  72.  
  73.  
  74. <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  75.  
  76. <script type="text/javascript">
  77.  
  78. /***********************************************
  79. * Fixed ToolTip script- © Dynamic Drive (www.dynamicdrive.com)
  80. * This notice MUST stay intact for legal use
  81. * Visit http://www.dynamicdrive.com/ for full source code
  82. ***********************************************/
  83.  
  84. var tipwidth='150px' //default tooltip width
  85. var tipbgcolor='#EFEFEF' //tooltip bgcolor
  86. var disappeardelay=2000 //tooltip disappear speed onMouseout (in miliseconds)
  87. var vertical_offset="0px" //horizontal offset of tooltip from anchor link
  88. var horizontal_offset="-3px" //horizontal offset of tooltip from anchor link
  89.  
  90. /////No further editting needed
  91.  
  92. var ie4=document.all
  93. var ns6=document.getElementById&&!document.all
  94.  
  95. if (ie4||ns6)
  96. document.write('<div id="fixedtipdiv" style="visibility:hidden;width:'+tipwidth+';background-color:'+tipbgcolor+'" ></div>')
  97.  
  98. function getposOffset(what, offsettype){
  99. var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
  100. var parentEl=what.offsetParent;
  101. while (parentEl!=null){
  102. totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
  103. parentEl=parentEl.offsetParent;
  104. }
  105. return totaloffset;
  106. }
  107.  
  108.  
  109. function showhide(obj, e, visible, hidden, tipwidth){
  110. if (ie4||ns6)
  111. dropmenuobj.style.left=dropmenuobj.style.top=-500
  112. if (tipwidth!=""){
  113. dropmenuobj.widthobj=dropmenuobj.style
  114. dropmenuobj.widthobj.width=tipwidth
  115. }
  116. if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
  117. obj.visibility=visible
  118. else if (e.type=="click")
  119. obj.visibility=hidden
  120. }
  121.  
  122. function iecompattest(){
  123. return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
  124. }
  125.  
  126. function clearbrowseredge(obj, whichedge){
  127. var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1
  128. if (whichedge=="rightedge"){
  129. var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
  130. dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
  131. if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
  132. edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
  133. }
  134. else{
  135. var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
  136. dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
  137. if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
  138. edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
  139. }
  140. return edgeoffset
  141. }
  142.  
  143. function fixedtooltip(menucontents, obj, e, tipwidth){
  144. if (window.event) event.cancelBubble=true
  145. else if (e.stopPropagation) e.stopPropagation()
  146. clearhidetip()
  147. dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
  148. dropmenuobj.innerHTML=menucontents
  149.  
  150. if (ie4||ns6){
  151. showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
  152. dropmenuobj.x=getposOffset(obj, "left")
  153. dropmenuobj.y=getposOffset(obj, "top")
  154. dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
  155. dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
  156. }
  157. }
  158.  
  159. function hidetip(e){
  160. if (typeof dropmenuobj!="undefined"){
  161. if (ie4||ns6)
  162. dropmenuobj.style.visibility="hidden"
  163.  
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.
May 7 '06 #1
4 2101
Niheel
2,460 Expert Mod 2GB
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.
May 7 '06 #2
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
May 9 '06 #3
chido
2
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.
Jun 11 '06 #4
ablaye
11
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.
Jun 12 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: adrianTNT | last post by:
Hello, can anyone help me with this? I am new to PHP. I would like to load a variable from a php file, the php script should only give the variable if it was requested by a page on my site. the...
2
by: rpesq | last post by:
Hi, I Need help changing the content of a DIV. I sincerely researched the issue and have not found a solution except to scrap the idea and stick with the iframe code that I had been using. My...
2
by: Billy | last post by:
Hi. I'm new to asp.net and I'm trying to create a confirm dialog box using the confirm() javascript function that will pup once the submit button is pressed. My problem is when I call...
4
by: Paul | last post by:
Hi I have a page that pops up a warning box if a selection is not made, see below. <script language="javascript" event="onclick" for="btn_submit"> if(document.Form1.drp_dn_arriv.selectedIndex==0)...
5
by: Barry | last post by:
I've wasted the whole day trying things and researching, but nothing is working. I would *greatly* appreciate if someone can give me the solution to this problem. I'm using the .NET Framework...
2
by: balakred | last post by:
<html> <script language="text/javascript"> var test=DValue; </script> <body> <inpu type="text" name="name" value="<script>test</script>" /> </body> </html> i want get the test "DValue"...
4
missshaikh
by: missshaikh | last post by:
hi friends I want add MSN webmessenger script to my own website. like http://www.ebuddy.com/ use the MSN Web Messenger. I want to directly connect to the msn not connect with any 3rd party...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.