daveWare
-
Posts
18 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by daveWare
-
-
I tried the disable and readonly attributes as well as border none and border white. I still get a grey line.What CSS did you try?I set up a few boxes:http://kashi.freelancedreams.com/textarea.htmlYou can use the readonly attribute, and either set the border color to match your background, or just set it to border: none; Either should be fine. I tested it with firefox 2.0, IE7, Opera9, SeaMonkey. Style doesn't work right on the PSP or sidekick though >_<;
I tried this but i don't think i tried it on the correct page. I'm guessing this should be implemented on the preview page. Doesn't seem to work on the preview page either. tried /r and /n no luck.If you want to display the text in a div, you'll have to use some string method to replace all of the "\n"s with "<br />"s. In javascript, it'd look something like this:document.getElementByTagName("pre").innerHTML = content.replace("\n", "<br />");
-
I have a text area in the html form to submit the data.
<textarea name="content" id="content"><%= Request.Form("content") %></textarea>
The code is then displayed in the preview page. Your solution will work well here, except for the border that won't go away.
<div id="fc_content"> <pre width="132"><%= Request.Form("content") %></pre> </div>
After the preview page I pass the data via hidden fields either back to the initial from for modification, or on to the processing page where the html e-mail is generated. Again your solution works but for the border that won't go away. Any ideas? Tried CSS but still a border.
<table width="560" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <form name="returnForm" method="post" action="fc_email_form.asp" > <div align="center"> <input name="toName" type="hidden" id="toName" value="<%= Request.Form("toName") %>" /> <input name="toEmail" type="hidden" id="toEmail" value="<%= Request.Form("toEmail") %>" /> <input name="cc" type="hidden" id="cc" value="<%= Request.Form("cc") %>" /> <input name="fromName" type="hidden" id="fromName" value="<%= Request.Form("fromName") %>" /> <input name="fromEmail" type="hidden" id="fromEmail" value="<%= Request.Form("fromEmail") %>" /> <input name="subject" type="hidden" id="subject" value="<%= Request.Form("subject") %>" /> <input name="content" type="hidden" id="content" value="<%= Request.Form("content") %>" /> <input name="Submit" type="submit" class="sendBtn" value="Modify E-mail" /> </div> </form> </td> <td> <form name="emailForm" method="post" action="fc_email_form_processor.asp" > <div align="center"> <input name="toName" type="hidden" id="toName" value="<%= Request.Form("toName") %>" /> <input name="toEmail" type="hidden" id="toEmail" value="<%= Request.Form("toEmail") %>" /> <input name="cc" type="hidden" id="cc" value="<%= Request.Form("cc") %>" /> <input name="fromName" type="hidden" id="fromName" value="<%= Request.Form("fromName") %>" /> <input name="fromEmail" type="hidden" id="fromEmail" value="<%= Request.Form("fromEmail") %>" /> <input name="subject" type="hidden" id="subject" value="<%= Request.Form("subject") %>" /> <input name="content" type="hidden" id="content" value="<%= Request.Form("content") %>" /> <input name="Submit" type="submit" class="sendBtn" value="Send E-mail" /> </div> </form> </td> </tr></table>
the processor page.
<%Dim strSubject, strToName, strToEmail, strCC, strFromName, strFromEmail, strContent' get the values strSubject = Trim(Request.Form("subject")) strToName = Trim(Request.Form("toName")) strToEmail = Trim(Request.Form("toEmail")) strCC = Trim(Request.Form("cc")) strFromName = Trim(Request.Form("fromName")) strFromEmail = Trim(Request.Form("fromEmail")) strContent = Trim(Request.Form("content")) 'Send EmailDim Mail, Flds, strBody, strHTMLSet Mail = Server.CreateObject("CDO.Message") Dim iConf : Set iConf = Server.CreateObject("CDO.Configuration")Set Flds = iConf.FieldsWith Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "70.86.221.226" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30 .UpdateEnd With With Mail Set .Configuration = iConf .To = strToName & " " & "<" & strToEmail & ">" .From = strFromName & " " & "<" & strFromEmail & ">" .Cc = strCC .Subject = strSubject strHTML = "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"">" &_ "<html xmlns=""http://www.w3.org/1999/xhtml"">" &_ "<head>" &_ "<meta http-equiv=""Content-Type"" content=""text/html; charset=ISO-8859-1"" />" &_ "<title>Full Circle</title>" &_ "<style type=""text/css"">" &_ "<!--" &_ "body {font: normal 12px/16px Arial, Helvetica, sans-serif; text-transform: none; color: #666666; text-decoration: none;}" &_ "pre {font: normal 12px/16px Arial, Helvetica, sans-serif;}" &_ "#container {text-align: center; width: 560px; border: 1px solid #666666; margin: 20px auto; position: relative;}" &_ "#fc_logo {text-align: left; padding: 26px;}" &_ "#fc_content {padding: 0px 26px 15px; text-align: left;}" &_ "#foot {background: url(""http://www.fullcp.com/fc_email/email_template/img_rollercoaster.jpg"") no-repeat; border-top: 1px solid #666666; height: 133px; padding-left: 191px; padding-top: 20px; text-align: left; margin: 0px; padding-bottom: 20px;}" &_ "#foot p {margin: 0px 0px 15px; padding: 0px;}" &_ "#foot h1 {color: #0065a4; margin: 0px; padding: 0px; font-weight: bold; font-size: 12px; line-height: 18px; text-decoration: none;}" &_ "a:link, #foot a:visited {color: #0065a4; font-weight: bold; text-decoration: none;}" &_ "a:hover {color: #666666;}" &_ "-->" &_ "</style>" &_ "</head>" &_ "<body>" &_ "<div id=""container"">" &_ "<div id=""head""><img src=""http://www.fullcp.com/fc_email/email_template/img_tree.jpg"" alt=""Picture of a tree on a hill"" /></div>" &_ "<div id=""fc_logo""><img src=""http://www.fullcp.com/fc_email/email_template/logo_full_circle.gif"" alt=""Full Circle Real Estate Marketing"" /></div>" &_ "<div id=""fc_content"">" &_ "<pre width=""132"">" & strContent & "</pre>" &_ "</div>" &_ "<div id=""foot"">" &_ "<h1>FULL CIRCLE PRODUCTIONS, LLC | <a href=""http://www.fullcp.com"">WWW.FULLCP.COM</a></h1>" &_ "<p>Integrated marketing, advertising and brand management<br />" &_ "exclusive to the real estate industry.</p>" &_ "5775 Glenridge Drive | Suite D400 | Atlanta, GA 30328<br />" &_ "T 404.256.4083 | F 404.256.1352</div>" &_ "</div>" &_ "</body>" &_ "</html>" .HTMLBody = strHTML strBody = strContent .TextBody = strBody End With On Error Resume Next Mail.SendIf Err <> 0 Then Response.Write "Error encountered: " & Err.DescriptionEnd IfOn Error Goto 0Response.Redirect "mail_sent.htm" %>
Sorry there is a lot of code.
-
You said that you changed the valign of the TD that contains the nav table, yes? Is there any CSS that would be effecting it? padding? vHeight on the image? I'm afraid I'd have to see the page to be of anymore help.Dave
-
You can also make drop-down lists using CSS. http://www.alistapart.com/articles/horizdropdowns I'm not all that familiar with AJAX, but my understanding is that AJAX allows you to get information without refreshing the page. Don't know how it would work for a nav itemDaveSomeone suggested to use Ajax for the drop down lists to get the items, etc. What is Ajax and best way to achieve this? -
Sound's like a plan. HTML and XHTML are close enough to make that transition easy. I recently made the transition to table-less layout . Its been an adventureOk thanks everyone for the advice. I decided I should go with XHTML and then CSS. -
Hello,I'm setting up a e-mail from that sends via asp. The problem I'm having is after I pass the data in the text field to the preview page, I use the pre tag to maintain formatting on the text. The copy, However, does not wrap to the next line it runs a single line breaking out the side of the document, even though there is a container div around the text.Does any one have any experience with this? Any ideas on how to get the text to wrap?Thanks in advance,Dave
-
Thats what I thought. But when I move the variable up and comment out the dupes, the script breaks. Go figure. On a better note. If I strip out the onload function I created and just go with your code it works and is stable in IE6, Safari and Firefox. Thanks again,Dave
-
That was great! Just the push I needed. Thank you. I'm now getting the desired effect: http://www.fullcp.com/test/My code ended up a little different. I tried moving the variable so it could be accessed by other functions but the script didn't like it. Any suggestions on cleaning up the code?Right now the script is breaking my css and not displaying correctly in IE6. the test looks fine but the page is messed up. anyone see anything obvious? I'll have to troubleshoot it tomorrow. Dave
// Full Circle Navigation: JavaScript Document//Pre-Cache the imagesvar navItem = new Array(); navItem[0] = "nav_home"; navItem[1] = "nav_contact"; navItem[2] = "nav_residences"; navItem[3] = "nav_urban"; navItem[4] = "nav_amenities"; navItem[5] = "nav_lifestyle"; navItem[6] = "nav_location"; navItem[7] = "nav_about"; navItem[8] = "nav_news"; navItem[9] = "nav_enews"; if (document.images) { var imageOff = new Object(); for (i=0; i<navItem.length; i++) { imageOff[navItem[i]] = new Image(24, 130); imageOff[navItem[i]].src = "images/"+navItem[i]+".gif"; } var imageOn = new Object(); for (h=0; h<navItem.length; h++) { imageOn[navItem[h]] = new Image(24, 130); imageOn[navItem[h]].src = "images/"+navItem[h]+"-over.gif"; }}//Set the Current Page in the navfunction setPage() { var bodyID = document.getElementsByTagName("body")[0].id; //Get the body ID if (document.images) { for (x=0;x<navItem.length;x++) { if ("nav_"+bodyID == navItem[x]) { document.getElementById(navItem[x]).src = imageOn[navItem[x]].src //document.write(navItem[x] + "<br />"); } } } return false;} //Swap image functionfunction setImage(imgID, type) { if (document.images) { if (type == "on") { var bodyID = document.getElementsByTagName("body")[0].id; //Get the body ID if ("nav_"+bodyID == imgID) {} else { document.getElementById(imgID).src = imageOn[imgID].src; } return true; } else if (type == "off") { var bodyID = document.getElementsByTagName("body")[0].id; //Get the body ID if ("nav_"+bodyID == imgID) {} else { document.getElementById(imgID).src = imageOff[imgID].src; } return true; } } return false; }
-
Hello,I'm hoping someone can help me. I'm using the following script to pre-cache my nav images and create the rollovers for a site I'm working on. I'd like to identify the current page by activating the on state and disabling the onMouseOver event, but I'm having trouble putting the code together. I can do it manually by placing the on image and removing the call for the onMouseOver event, but I'd rather have some code that does it automatically.You can see the nav here: http://www.fullcp.com/test/My current line of thinking, is an if statement that uses either the body id or the url to stop the setImage function. I'm just not sure how to go about doing it.Create an array and list the different pages? If document.URL is equal to array return false?Thanks for your help.Dave
//Pre-Cache the imagesvar navItem = new Array(); navItem[0] = "nav_home"; navItem[1] = "nav_contact"; navItem[2] = "nav_residences"; navItem[3] = "nav_urban"; navItem[4] = "nav_amenities"; navItem[5] = "nav_lifestyle"; navItem[6] = "nav_location"; navItem[7] = "nav_about"; navItem[8] = "nav_news"; navItem[9] = "nav_enews"; if (document.images) { var imageOff = new Object(); for (i=0; i<navItem.length; i++) { imageOff[navItem[i]] = new Image(24, 130); imageOff[navItem[i]].src = "images/"+navItem[i]+".gif"; } var imageOn = new Object(); for (h=0; h<navItem.length; h++) { imageOn[navItem[h]] = new Image(24, 130); imageOn[navItem[h]].src = "images/"+navItem[h]+"-over.gif"; }}//Swap image functionfunction setImage(imgID, type) { if (document.images) { if (type == "on") { document.getElementById(imgID).src = imageOn[imgID].src; return true; } else if (type == "off") { document.getElementById(imgID).src = imageOff[imgID].src; return true; } } return false; }
-
date function
in PHP
Brilliant!I put the code into a function because I wasn't sure how to get the $time and $date variables into the $today variable. your solution simplified the code and I didn't really need the function at all. Best of all it works. I don't know why I didn' t think of it my self. I hadn't really worried about the math til last. I was more worried about it working. In case your interested here is the final code:
/* Create the date Timestamp */$timeDiff = 3 + date('I'); /* the "date('I')" part is where it accounts for day light savings. */$timeZone = time() + ($timeDiff*60*60);$today = date('m/d/Y H:i',$timeZone);
Thank you so much for your help!Dave
-
date function
in PHP
Okay, I reread the pages you suggested and put this:
$today = theDate($date, $time);function theDate($date, $time) {$timeDiff = 7 + date('I'); /* the "date('I')" part is where it accounts for day light savings. */$timeZone = time() - ($timeDiff*60*60);$date = date('m/d/Y',$timeZone);$time = date('H:i',$timeZone);}
In my PHP, When I look at the database nothing has been entered into the dateEntry field. Same thing that happened before. Any ideas what I'm doing wrong?Further information; this is my INSERT statement
INSERT INTO contact_tbl (dateEntry, fname, lname, address1, address2, city, state, zip, email, phone) VALUES ('$today', '$first', '$last', '$add1', '$add2', '$city', '$state', '$zip', '$email', '$phone')";
Thanks,Dave
-
date function
in PHP
On my contact form I want to include a date of when the submission took place. I've added the date function to my processor page:
$today = date("m/d/Y H:i");
Now how do I add 3 hours to account for the difference in time zone. the server is running php 4.4.1.I know this is something simple but every combination so far doesn't work. Being new to programming I figure its time to call for help.Thanks,Dave
-
I want to use a graphic for the submit and reset buttons on my form.Tried this:
<table width="481" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left"><input type="button" src="rar_images/btn_submit_alt.gif" class="submit" name="submit2" value="Submit to Right Angle Realty" /></td> <td align="right"><input type="button" src="rar_images/btn_clear_alt.gif" class="clear" name="clear2" value="Reset" /></td> </tr> </table>
Tried this:
<table width="481" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left"><input type="text" src="rar_images/btn_submit_alt.gif" class="submit" name="submit2" value="Submit to Right Angle Realty" /></td> <td align="right"><input type="text" src="rar_images/btn_clear_alt.gif" class="clear" name="clear2" value="Reset" /></td> </tr> </table>
This seems to work the best but there is no rollover in IE6 PC and doesn't display at all in Safari:
<table width="481" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left"><input type="submit" class="submit" name="submit" value="Submit to Right Angle Realty" /></td> <td align="right"><input type="reset" class="clear" name="clear" value="Clear Form" /></td> </tr> </table>
And here is the css to go with it:
.submit { color: #fff; text-decoration: none; background: url(../rar_images/btn_submit.gif) no-repeat; display: block; height: 30px; width: 211px; text-align: center; border-style: none; padding-bottom: 2px;}.submit:hover { background: url(../rar_images/btn_submit-over.gif) no-repeat;}.clear { color: #fff; text-decoration: none; background: url(../rar_images/btn_clear.gif) no-repeat; text-align: center; display: block; height: 30px; width: 108px; border-style: none; padding-bottom: 2px;}.clear:hover { background: url(../rar_images/btn_clear-over.gif) no-repeat;}
Note: I do have the csshover.htc behavior installedAny one have any suggestions? Thanks.Edit: Sorry about the typo in the Title
-
Thanks
-
So it doesn't really matter. Thanks!All three ways are correct. -
When dropping in a background image I've seen the code written several different ways and was wondering what the correct method is. Example 1 I believe this is how Dreamweaver writes it.
background-image: url(../images/header.gif);
Example 2 I've seen it written this way on the Web using double quotes.
background-image: url("../images/header.gif");
Example 3 I've also seen it written this way on the Web using single quotes.
background-image: url('../images/header.gif');
or does it matter?and if it does matter can I assume it applies to any property that uses url()?Thanks,Dave
xhtml pre tag
in HTML/XHTML
Posted