[thelist] IE & JS

Norman Bunn norman.bunn at craftedsolutions.com
Thu Oct 6 16:13:08 CDT 2005


I have a little script on this page that takes the passed parameters and 
brings in a photo, name, and email address for a contact form.  It works 
fine in FF & Opera with no errors, but nothing in IE.  Any ideas on 
what's wrong with this?

                    <script language="JavaScript">
                        var first, last, emailstr, greetstr, photostr, 
HTMLstr;
                        var searcharray = new Array();
                        var valuearray = new Array();
                        var searchstr = location.search;
                        searchstr = searchstr.substr(1,searchstr.length);
                        searcharray = searchstr.split('&');
                        for (i = 0; i < searcharray.length; i++){
                                valuearray[i] = new Array();
                                valuearray[i] = searcharray[i].split('=');
                                if(valuearray[i][0] == "first"){
                                        first = valuearray[i][1];
                                }
                                else if(valuearray[i][0] == "last"){
                                        last = valuearray[i][1];
                                }
                        }
                        emailstr = first+"_"+last+"@stokestrainor.com";
                        greetstr = "Contact "+first+" "+last;
                        document.submit.recipient = emailstr;
                        HTMLstr = "<img 
src=\"images/"+first+"_"+last+"2.jpg\"><p 
class=\"title\">"+greetstr+"</p><p>Have a question or comment for 
"+first+" "+last+"?<br>Please fill out this form or or use one of the 
numbers below.</p><p class=\"title\">888-665-3800<br>803-276-8888</p>";
                        document.write(HTMLstr);
                    </script>


Thanks,

Norman

-- 
---

Norman W. Bunn
norman.bunn at craftedsolutions.com
803.405.1008
----------------------------------------------
www.CraftedSolutions.com
Crafted Solutions, Inc.
Web Design & Development
Web Site Hosting & Custom Solutions
"Get the results the Internet promises;
 get the 'Net Result' from Crafted Solutions!"
----------------------------------------------



More information about the thelist mailing list