Jump to content

mboehler3

Members
  • Content Count

    304
  • Joined

  • Last visited

Everything posted by mboehler3

  1. Hi, I am trying to create a rollover fade effect for images on my page here: http://acq.matthewboehler.com/test.php. The large kitchen image does the rollover right now. I found the rollover fade script online, and it places one image on top of the other. If you shrink your browser, you'll see the images do not stay on top of each other. In Firefox, the original image is moved up. In Internet Explorer, it places the rollover image directly below the original image. In Safari, it works perfect, exactly how it should. Is it possible to put a container around the images so they stay in place, like in Safari? I've tried putting a div tag around the image, making the max-width 100%; max-height 100%, but that did not work. Any help you can offer is greatly appreciated.
  2. Alright, nevermind, solved it using margin-right:10%;margin-left:10%.
  3. Actually this may be more than I asked for. I didn't think about when the browser is scaled down. Ideally no matter how far down the browser shrinks, I'd like to have 10% of dead space on the left and right of the screen.
  4. Thank you, that works for me. Each column has a different width, so instead of making each column 33%, I made it relative to the container size. The middle column is the widest, and the left column is the narrowest. Now, is it possible to get everything centered on the page, like "margin-left:auto;margin-right:auto" works? I tried that and it did not work. By default everything is left aligned. I even tried putting everything in a table and that did not work.
  5. Hi all, I'm working with fluid images for the first time at the request of a client. The design of the webpage has a row of three images, expanding a total of roughly 1180 pixels. Take a look here:http://acq.matthewboehler.com/test.phpI'm using fluid images because I want to make it so that, if the browser is shrunk below 1180 pixels wide, the row of images stays intact, and the images simply shrink.Right now, when you shrink the browser, the images fall onto another line. Shrink it far enough and you have three images stacked on top of each other.Is it possible through CSS to keep these images on the same line? I've even tried putting the images in a table, but it still pushes them onto a new line.Any help is very much appreciated, thank you!
  6. The thing is, I removed all of the borders in the CSS and it still displays the line on the rolloff. The script does have height variables though. I don't understand why the height would need to be adjusted if there are no borders.
  7. Hi all, I found a dropdown menu script here: http://www.scriptiny.com/2008/04/sliding-javascript-dropdown-menu/ I am using it on my website here: http://acq.matthewboehler.com/ When you rollover one of the six navigation links, the dropdown menu slides as it should. But the problem is when you rolloff of the link - as the menu shrinks, there is a border-line that exists right underneath the text-link. You have to look kinda close at a high resolution screen to see it, but it's there. Refresh the page and it's gone. But rollover and rolloff again, and it shows on the rolloff. I'm not very familiar with JavaScript so even if this is an easy fix, I'm not quite sure how to do it. Is this an easy fix? I tried adding display:none or opacity:none to the javascript, but nothing seemed to work. Can anyone offer some advice? Thanks in advance to any help you can provide.
  8. This site here accomplishes what I would like through Flash: http://www.paulshark.it/en I would like to accomplish this without Flash.
  9. Hi all, I'm not sure if CSS can accomplish this, but here's what I would like to do: The design for my website is 1100 pixels wide. There are 100 pixels of empty space on both sides, leaving 900 pixels in the center for content. Most of the content is images, with some (little) text. I want to code the site so that, when the user expands their browser to, say, 1500 pixels wide, the 100 pixels of empty space still exists on both sides, but the center content expands from 900 to 1300 pixels. In doing so, the images inside the content also expand their size to cover the entire 1300 pixels. I'm not exactly sure how this would work - would the original size of the images need to be huge, and then in the code they are displayed at a percentage? Does anyone see any problems coding a site like this? Have you ever seen a site built like this? Is this something better suited for jQuery or Flash? Any insight you can offer is much appreciated, thank you.
  10. Hi all, I am trying to display an RSS feed on my ASP website. Currently, the date is displayed as "Dec 07 2011." I would like to display it as "December 7, 2011." Here is the code I've put together so far: <html><head><title>RSS Feed Using ASP Classic - For Texas Longhorns Football Schedule from TicketCity.com</title><style> *{font-family:verdana;} td{vertical-align:top;padding:5px 5px 5px 5px;}</style></head><body><%' change the RSSURL variable to the exact URL of the RSS Feed you want to pullRSSURL = "http://blog.surepayroll.com/feed/?alt=rss"Dim objHTTP ' this object is used to call the RSS Feed remotelyDim RSSURL,RSSFeed ' these variables hold the URL and Content for the RSS FeedDim xmlRSSFeed ' this variable hold the XML data in a DOM ObjectDim objItems,objItem, objChild ' these variables are used to temporarily hold data from the various RSS ItemsDim title,pubdate,description,link ' these are local variables that will hold the data to be displayedDim OutputHTML_1,OutputHTML_2,OutputHTML_3 ' these variables will hold the HTML that was converted from the RSS Feed' this code requests the raw RSS/XML and saves the response as a string <RSSFeed>Set objHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")objHTTP.open "GET",RSSURL,falseobjHTTP.sendRSSFeed = objHTTP.responseText' this code takes the raw RSSFeed and loads it into an XML ObjectSet xmlRSSFeed = Server.CreateObject("MSXML2.DomDocument.4.0")xmlRSSFeed.async = falsexmlRSSFeed.LoadXml(RSSFeed)' this code disposes of the object we called the feed withSet objHTTP = Nothing' this is where you determine how to display the content from the RSS Feed' this code grabs all the "items" in the RSS FeedSet objItems = xmlRSSFeed.getElementsByTagName("item")' this code disposes of the XML object that contained the entire feedSet xmlRSSFeed = Nothing' loop over all the items in the RSS FeedFor x = 0 to objItems.length - 8 ' this code places the content from the various RSS nodes into local variables Set objItem = objItems.item(x) For Each objChild in objItem.childNodes Select Case LCase(objChild.nodeName) Case "pubdate" pubDate = objChild.text Case "title" title = objChild.text Case "link" link = objChild.text Case "description" description = objChild.text End Select Next ArrayTemp = split(pubDate, " ") pubDate2 = ArrayTemp(2) & " " & ArrayTemp(1) & " " & Cint(ArrayTemp(3)) ' Here are some various display samples. OutputHTML_1 = OutputHTML_1 & pubDate2 & "<br /><a href=""" & link & """>" & title & "</a><br /><br />" OutputHTML_2 = OutputHTML_2 & "<a href=""" & link & """>" & title & "</a><br />" OutputHTML_3 = OutputHTML_3 & "<a href=""" & link & """>" & title & "</a><hr />"Next%><!-- This is the HTML Layout that will render content from the RSS Feed -->Here is the output, with content provided by the RSS Feed located at:<br /><%=RSSURL%><hr /><table border="1"><tr> <td>Ouput Style 1</td> <td>Ouput Style 2</td> <td>Ouput Style 3</td></tr><tr> <td><%=OutputHTML_1%></td> <td><%=OutputHTML_2%></td> <td><%=OutputHTML_3%></td></tr></table></body></html> I've been looking for a script online as I'm not skilled enough to create code of my own. Can anyone give me some advice?
  11. I figured it out, here's the code I used: <script language="JavaScript" type="text/javascript">var currentDiv = '';var oldClassName = '';function itemClicked(divID, className){if (currentDiv != ''){ document.getElementById(currentDiv).className = oldClassName;}oldClassName = document.getElementById(divID).className;document.getElementById(divID).className = className;currentDiv = divID;}</script>
  12. Ok I've got the first two steps down: http://www.wuzhannanan.com/backend/nov-2011-test-page.html But I'm having trouble changing the classes when another element is clicked. I can't find any scripts available and I haven't had much luck writing it myself. Can someone please give me an idea of what the code will look like?
  13. Hi all, I am trying to create a rollover effect for a menu that functions like this: I want the background image to change on when you rollover it, and then change back to its original state when rolled out I want the background image to change when you click it and stay on that image when you roll out I want the new "clicked" image to remain until another image has been clicked, which operates the same way I have my code set up here: http://www.wuzhannanan.com/backend/nov-2011-test-page.html Try it out and you'll see when you click on one of the images, it changes, but then changes back once rolled out. Is this an easy fix or is there a script I can borrow from somewhere? I haven't been able to find anything yet. Thanks in advance for any help you can provide.
  14. I think that's where I'm running into the issue - defining the variable. All of the examples I've found online give variables a set value. Like, $emp_cnt = 1 or $emp_cnt = "Hello World"... The value for $emp_cnt changes, depending on what they entered in the form. I tried changing my code to this: <?php$emp_cnt = $_GET["NumberOfEmployees"];if ( $emp_cnt == "" or $emp_cnt < 1 ) {$emp_cnt == 1;}$str_pf = $_GET["Frequency"];if ( $str_pf == "" ) {switch ($str_pf){case "Weekly": $str_pf == "Weekly"; break;case "Bi-Weekly": $str_pf == "Bi-Weekly"; break;case "Semi-Monthly": $str_pf == "Semi-Monthly"; break;default: $str_pf == "Monthly";}}?> But I still don't see the numbers populate. Can I define them like I did above?
  15. I am trying to convert my ASP code to PHP. This code is used to display a price quote based on information a user has submitted through a form on the previous page. The Price Quote is determined by a math equation: the Base fee + (Number of Employees x TransTotal). On the previous page, the user has entered in the Number of Employees as well as selected their Frequency (Weekly, Bi-Weekly, Semi-Monthly or Monthly). Both Frequency and Number of Employees will be passed through the query string. On my first include file, I set the Employees and Frequency. For Number of Employees, I first want to check the query string for a value. If nothing is in the query string, the default value should be 1. Then, do the same for Frequency. Monthly is set as the default value if nothing is entered in the query string. On my second include file, I have the equations, where I set the Base fee and TransTotal. For Weekly, Bi-Weekly and Semi-Monthly, the Base fee is $69.99. For Monthly it is $54.99. The TransTotal only applies if the Number of Employees is greater than 5. If the number is greater than 5, the TransTotal is $1.99, for all frequencies. And then I want to pull each variable on my page to display. I wrote the code this morning and tested it locally, but the variables to not show up on my page. Am I close to getting this to work? With nothing in the query string, the Price Quote should be $54.99 (Monthly default, 1 employee default). But, no price shows up at all. First include: <?phpif ( $emp_cnt == "" ) {$emp_cnt == $_SERVER["NumberOfEmployees"];}if ( $emp_cnt == "" or $emp_cnt < 1 ) {$emp_cnt == 1;}if ( $str_pf == "" ) {$str_pf == $_SERVER["Frequency"];switch ($str_pf){case "Weekly": $str_pf == "Weekly"; break;case "Bi-Weekly": $str_pf == "Bi-Weekly"; break;case "Semi-Monthly": $str_pf == "Semi-Monthly"; break;default: $str_pf == "Monthly";}}?> Second include: <?phpif ( $str_pf == "Weekly" && $emp_cnt <= 5 ) {$base == 69.99;$trans == 0;}if ( $str_pf == "Weekly" && $emp_cnt > 5 ) {$base == 69.99;$trans == 1.99;}if ( $str_pf == "Bi-Weekly" && $emp_cnt <= 5 ) {$base == 69.99;$trans == 0;}if ( $str_pf == "Bi-Weekly" && $emp_cnt > 5 ) {$base == 69.99;$trans == 1.99;}if ( $str_pf == "Semi-Monthly" && $emp_cnt <= 5 ) {$base == 69.99;$trans == 0;}if ( $str_pf == "Semi-Monthly" && $emp_cnt > 5 ) {$base == 69.99;$trans == 1.99;}if ( $str_pf == "Monthly" && $emp_cnt <= 5 ) {$base == 54.99;$trans == 0;}if ( $str_pf == "Monthly" && $emp_cnt > 5 ) {$base == 54.99;$trans == 1.99;}$total == ( $base + ( $trans*$emp_cnt ) )?> And my page: <html><head><style type="text/css">a {text-decoration:none; color:#0c72b2;}a:hover {text-decoration:underline;}.fontsize12 {font-size:12px;}.fontsize10 {font-size:10pt;}.color0c72b2 {color:#0c72b2;}.colorc86d14 {color:#c86d14;}.head {font-size:30px;font-family:Arial;font-weight:bold;float:left;padding-top:4px;}.quote {font-size:16px;font-family:Arial;font-weight:bold;float:left;padding:4px 0 0 0;}.clear {clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0;}.dlquote {font-size:18px;font-family:Arial;padding-bottom:10px;font-weight:bold;padding:5px 0 5px 15px;}.subbody {font-size:8pt;font-family:Arial;padding-left:15px;}.price-container {width:354px;height:224px}.bottom-border {font-size:18px;font-family:Arial;padding:5px 0 10px 15px;font-weight:bold;border-bottom:1px solid #807e7e}.price-copy {font-size:18px;font-family:Arial;font-weight:bold;}</style></head><body><?php include("ipq_vars.php"); ?><?php include("ipq_prices.php"); ?><div class="price-container"><div class="head">$<?php ($total); ?></div><img src="/images/960/quote/quote-divider.gif" style="float:left;" /><div class="quote">Your Payroll Quote<br />$<?php $total ?>* per payroll</div><div class="clear"> </div><div class="body"><div class="bottom-border"><div class="price-copy">For Payroll <?php $freq ?> <?php ($emp_cnt) ?> Employees</div></div><div class="dlquote"><span class="color0c72b2">>></span><a href="/quote/GoodFaith.asp?Total=<?php $total ?>&BaseFee=<?php $base ?>&EmCount=<?php $emp_cnt ?>&TransTotal=<?php $trans ?>&Frequency=<?php $freq ?>" target="_blank">Download Your Quote <span class="fontsize12">(pdf)</span> <img src="/images/960/quote/acrobat13x13.gif" border="0" /></a></div><div class="subbody"><span class="fontsize10">*Quote Details:</span><br />Per Payroll Base Price: $<?php $base ?><br />Per Employee Price: $<?php $trans ?><br /><br /></div></div></body></html>
  16. Does the hover over image need to be the same size as the normal image? I've got this far: http://www.wuzhannanan.com/backend/list-test.html Now I just need to correct the placement of the hover over image, and get it so that the other boxes do not move when one box is hovered. I'm not sure how the sub level ul would work in this case. Can I use margins to do this?
  17. Hi all, I am trying to accomplish something my graphic designer put together. We have a Video Hub page that links out to five category pages. Our designer put together this cool image, separate each category into a vertical, rounded box. Now, we'd like to make this interactive with a rollover feature. When you rollover each box, the box will visually "pop-out," and a small arrow will be below the box. Here's an example of how it would look when the user rolls over the Videos #3 box: Since the "rollover" box spills over into the left and right boxes, the only way I can think about doing this is to make all five boxes a background image, and then create a background image for each of the five rollover states. And then use CSS to replace each background image. Is this at all possible? Is there an easier/more efficient way I am not thinking of? Any help or insight is very much appreciated, thank you in advance.
  18. I am trying to 301 redirect a page, and I want to grab the Server Name using Request.ServerVariables. My 301 code looks like this: <%@ Language=VBScript %><%Response.Status="301 Moved Permanently"Response.AddHeader "Location", "https://<%= Request.ServerVariables("SERVER_NAME") %>/website.asp"%> But when I try to access the old page to see the redirect, I get this error in my browser: Microsoft VBScript compilation error '800a0401'Expected end of statement/surechoice/accounting-practice-management-insights.asp, line 4Response.AddHeader "Location", "https://<%= Request.ServerVariables("""SERVER_NAME""")-----------------------------------------------------------------------^ Is there a way to do this so that it will work (ie. read the quotations)?
  19. I am trying to put two forms on one page – one is a login form that asks for a username and password, and the other form requests information that triggers an email send. For some reason, the page won’t load when I place the logic for both forms on the page. My login form has code that looks like this: <form action="/accountants/" method="post" name="frmMain" class="Login" id="Form1" onSubmit="pageTracker._setVar(Accountant);"><input name="action" value="Edit" type="hidden" /><input name="partnerCode" value="" type="hidden" /><div class="acct-field"><input id="Text1" name="UserName" size="24" maxlength="50" tabindex="1" value="Username" onfocus="if(this.value == 'Username') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Username';}" /></div><div class="acct-field"><input id="Password1" name="Password" size="24" maxlength="20" type="password" tabindex="2" value="Password" onfocus="if(this.value == 'Password') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Password';}" /></div><input src="/images/960/accountant/form/acct_login.png" name="Submit" value="Submit" type="image" style="width:110px;height:31px;padding-right:10px" align="right" /></form> And behind the scenes, this code makes it work: <object RUNAT="SERVER" ID="oUser" PROGID="zUser.user"></object><object RUNAT="SERVER" ID="oPartner" PROGID="zPartners.partners"></object><object RUNAT="SERVER" ID="oErrors" PROGID="zErrorHandler.Errors"></object><object RUNAT="SERVER" ID="oLog" PROGID="zLog.Log"></object><object RUNAT="SERVER" ID="oLogin" PROGID="zLogin.Login"></object><object RUNAT="SERVER" ID="oUserSession" PROGID="zUserSession.UserSession"></object><object RUNAT="SERVER" ID="oCode" PROGID="zUtils.Code"></object><% Option ExplicitIf Application.Contents("debug") <> "YES" ThenOn Error Resume NextEnd If%><!-- #include virtual = "/Include/CheckRedirect.asp" --><%'=====================================================================================' Checks for IP/URLs that should not land on the SurePayroll Brochureware pages.' The CheckRedirect include contains all the code for checking the IP/URLs and' handling the actual redirect.'===================================================================================== if CheckRedirect thenend if %><!-- #include virtual = "/Include/pageAvail.asp" --><!-- #include virtual = "/Include/skinsdata.asp" --><!-- #include virtual = "/Include/SessionManagement.asp" --><!-- #include virtual = "/include/validate.asp" --><!-- #include virtual = "/Include/errorHandler.asp" --><!-- #include virtual = "/Include/ShowMediaTag.asp" --><!-- #include virtual = "/webglobals.asp" --><%'Read TAP partnerCode cookie'If it exists, read data into input fields'User information fields only available if the passed PC = "TAP"'== Declaration ==============================================================dim sBCL_code, lEmployeeID, iAccessLevel, lLoginCountdim lSkinID, lEmailID, lPromoIDdim oRS, v, sAction, bResult, sdim lUserKey, sUserName, sPassword, sPartnerCode, lLoginIDdim thisURLSecureDim secLoginID 'Security SecLoginID from tblSecLoginDim secUserTypeID 'Security SecUserTypeID from tblSecUserTypeDim iLogLoginTypeID 'Login type LogLoginTypeID from tblLogLoginTypesDim bSuccessDim sRedirectPageDim bIsPartnerUserDim iStep, sPageName, rsSteps, rsCodesDim sEncryptionTypeDim rsListDim sUrlPrefix'== Initialization ============================================================EnsureLoginSSL()sUrlPrefix = GetHttpUrlPrefix()secUserTypeID = 2 'Payroll useriLogLoginTypeID = 6 'Partner loginthisURLSecure = "https://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("SCRIPT_NAME")set oRS = server.CreateObject("ADODB.recordset")sAction = RestrictFilter(Request.Form("action"),f_alphanumeric,50)lUserKey = 0: lSkinID = 0: lEmailID = 0: lPromoID = 0: sBCL_code = "": sPartnerCode=""'==============================================================================If sAction = "Edit" thenvalidateUserElseEndUserSessionEnd ifSub validateUsersUserName = RestrictFilter(trim(Request.Form("username")), f_login_name, 50)sPassword = RestrictFilter(trim(Request.Form("password")), f_login_password, 50)if len(sUserName) = 0 then oErrors.Add "userName", "User name", "You must provide a user name."end ifif len(sPassword) = 0 then oErrors.Add "password", "password", "You must provide a password."end if ' EB June 17 2008 added case sensitivity implementation call oLogin.GetLoginIDByUserNameAndUserType(sUserName, secUserTypeID, secLoginID) bResult = oLogin.GetSecLoginInformationByLoginId(secLoginID, secUserTypeID, rsList) ' Set Variables from Recordset If Not rsList.EOF then sEncryptionType = rsList("EncryptionTypeId") else ' default: 2 - Case sensitive 1 - No case sensitive sEncryptionType = 2 end if set rsList = nothingif oErrors.Count = 0 then 'confirm that the user and password is correct 'lUserKey = oUser.ValidateUser(cstr(sUserName), cstr(sPassword)) lUserKey = oUser.ValidateUserWithEncryptType(cstr(sUserName), sEncryptionType, cstr(sPassword))end if If lUserKey > 0 Then 'Make log entry 'First retrieve the secLoginID call oLogin.GetLoginIDByUserNameAndUserType(sUserName, secUserTypeID, secLoginID) call oLog.AddLogLogin(secLoginID, sBCL_code, iLogLoginTypeID, secUserTypeID, Request.ServerVariables("REMOTE_ADDR"), sUserName, 1) Else 'Make log entry - unsuccessful call oLogin.GetLoginIDByUserNameAndUserType(sUserName, secUserTypeID, secLoginID) call oLog.AddLogLogin(secLoginID, 0, iLogLoginTypeID, secUserTypeID, Request.ServerVariables("REMOTE_ADDR"), sUserName, 0) End If '============= CHECK FOR ERROR ==================if err.number <> 0 then bResult = SetErrorInfo (1, sBCL_CODE, lEmployeeID)'=========== END CHECK FOR ERROR ================'========================================================================== '=== Check if login was restricted by program domain ====================== '=== GM added july 3 2008 - lock down by domain Dim rsDomainValidGetDomainValidatedByBCLAndUserType sBCL_CODE, secUserTypeID, rsDomainValidif rsDomainValid.BOF And rsDomainValid.EOF then oErrors.Add "Domain Restricted", "Login Restricted By Domain", _ "You can not login using this domain name. Contact your payroll administrator." end if if oErrors.Count = 0 then if lUserKey = 0 then 'validation failed bResult = oUser.GetUserInfo(oRS,0, , , sUserName) '============= CHECK FOR ERROR ================== if err.number <> 0 then bResult = SetErrorInfo (2, sBCL_CODE, lEmployeeID) '=========== END CHECK FOR ERROR ================ if oRS.State = adStateOpen then if not (oRS.BOF or oRS.EOF) then lUserKey = oRS("userkey") oRS.Close if lUserKey > 0 then 'increment failed login count 'bResult = oUser.setUserInfo(lUserKey, oErrors,,,,,,,,,,,1) bResult = oUser.SetUserInfoWithEncryptType(lUserKey, oErrors, sEncryptionType,,,,,,,,,,,1) '============= CHECK FOR ERROR ================== if err.number <> 0 then bResult = SetErrorInfo (3, sBCL_CODE, lEmployeeID) '=========== END CHECK FOR ERROR ================ end if oErrors.Add "password","Password","Either the password or username is incorrect." else oErrors.Add "password","Password","Either the password or username is incorrect." end if else oErrors.Add "password","Password","Either the password or username is incorrect." end if else 'get other values from tblUsers bResult = oUser.GetUserInfo(oRS, 0, ,,,lUserKey) '============= CHECK FOR ERROR ================== if err.number <> 0 then bResult = SetErrorInfo (4, sBCL_CODE, lEmployeeID) '=========== END CHECK FOR ERROR ================ if oRS.State = adStateOpen then if not (oRS.BOF or oRS.EOF) then iAccessLevel = oRS("accessLevel") sPartnerCode = trim(oRS("partnerCode")) sBCL_code = oRS("bcl_code") lLoginCount = oRS("loginCount") oRS.Close end if end if set oRS = nothing if lLoginCount < 10 then If oUserSession.IsPartnerAccessLevel(CLng(iAccessLevel), bIsPartnerUser) Then if bIsPartnerUser then 'set a new session id bResult = AddNewSessionV5("", sPartnerCode, 0, iAccessLevel, secLoginID, secUserTypeID) 'sBCL_code, iE1_id, iAccess_Level 'set userkey and partner code to session detail lLoginID = request.Cookies("TAP") call oUser.setSessionDtlV2(lLoginID, "USERKEY99", lUserKey) setSessionDtl lLoginID, "USERKEY", lUserKey setSessionDtl lLoginID, "PARTNERCODE", sPartnerCode if sPartnerCode = "TAP" then Response.Redirect "/SureChoice/enrollment/incomplete.asp" else 'has this trusted advisor completed enrollment sufficiently? bResult = oPartner.isReferralPartnerCompleted(sPartnerCode, sRedirectPage, oErrors) '============= CHECK FOR ERROR ================== if not bResult then bResult = SetErrorInfo (5, sBCL_CODE, lEmployeeID) '=========== END CHECK FOR ERROR ================ if oErrors.Count = 0 then 'Redirect user to the client list or for incomplete enrollments go to the 'appropriate Enrollment page 'Get enrollment step and page to redirect to bResult = oPartner.getPartnerEnrollmentStep (sPartnerCode, rsSteps) If bResult and rsSteps.State = adStateOpen Then If not rsSteps.EOF Then iStep = rsSteps("EnrollmentStep") If isNull(iStep) Then iStep = 0 End If End If End If '70 is a completed enrollment If iStep = 70 Then Response.Redirect "/SPF/SureChoice/default.aspx" 'Anything else is an incomplete enrollment Else 'Look up the page from the Codes table to redirect to bResult = oCode.getCodeGroup (rsCodes, "PartnerEnroll") If bResult and rsCodes.State <> 0 Then While not rsCodes.EOF If Trim(rsCodes("code_val")) = Trim(iStep) Then sPageName = Trim(rsCodes("code_desc")) Response.Redirect sPageName End If rsCodes.MoveNext Wend set rsCodes = nothing End If End If else Response.Redirect sRedirectPage end if ' errors count = 0 end if 'TAP partner code else oErrors.Add "username", "User name", "Password or username is invalid." end if 'accesslevel = 5 Else bResult = SetErrorInfo (6, sBCL_CODE, lEmployeeID) End If 'Is Partner Access Level else oErrors.Add "username", "User name", "There have been too many failed attempts to login." end if End ifend if End Sub'== Exit Procedures ==========================================================='=============================================================================='== ASP Procedures ============================================================Sub ErrorHandlerIf oErrors.Count > 0 Then Dim e Response.Write "Login Error: " For Each e In oErrors Response.Write e.Description NextEnd IfEnd Sub'This is used to delcare the page name for the navbar style to be correctdim PageNamePageName = "CPSHome"%><!-- #include virtual = "/webglobals960.asp" --> Additionally, the info request form looks like this: <form action="http://now.eloqua.com/" method="post" name="referaclient" onSubmit="return checkrefervalues();"><input type="hidden" name="sendemail" value="rac"> <%if sendemail = "rac" and refererror <> "" ThenIf refererror = "missinginfo" then Response.Write ("<p class='inputboxheaders error'><strong>Error - You are missing information, please answer all of the questions below so that we may better serve you.</strong>") end ifIf refererror = "dataintegrity" then Response.Write ("<p class='inputboxheaders error'><strong>Error - There was a problem with some of your answers, please try again.</strong>") end ifend If%><div class="acct-field"><input id="firstname" name="LastName" size="24" maxlength="50" tabindex="1" value="First Name*" onfocus="if(this.value == 'First Name*') {this.value = '';}" onblur="if (this.value == '') {this.value = 'First Name*';}" /></div><div class="acct-field"><input id="lastname" name="LastName" size="24" maxlength="50" tabindex="1" value="Last Name*" onfocus="if(this.value == 'Last Name*') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Last Name*';}" /></div><div class="acct-field"><input id="company" name="Company" size="24" maxlength="50" tabindex="1" value="Company*" onfocus="if(this.value == 'Company*') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Company*';}" /></div><div class="acct-field"><input id="email" name="emailAddress" size="24" maxlength="50" tabindex="1" value="Email*" onfocus="if(this.value == 'Email*') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Email*';}" /></div><div class="acct-field"><input id="phone" name="businessPhone" size="24" maxlength="50" tabindex="1" value="Phone*" onfocus="if(this.value == 'Phone*') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Phone*';}" /></div><div class="fontsize12"><strong>Select Interest</strong></div><input type="radio" name="cPAPartnerType" value="Reseller" />Reseller Program<br /><input type="radio" name="cPAPartnerType" value="Referrer" />Referral Program<br /><input type="radio" name="cPAPartnerType" value="Reports View Access Only" />Client View Access<br /><input type="radio" name="cPAPartnerType" value="General Interest" />All Programs<div class="fontsize12 lineheight18 tpadding10"><strong>Subscribe</strong></div><input type="checkbox" name="pMIOptIn" value="Yes" checked="yes" />Newsletter<input src="/images/960/accountant-center/form/partnership-submit.jpg" class="rpadding10 tpadding10" name="Submit" value="Submit" type="image" align="right" /><input type="hidden" name="referralCode" value="<% =fm_refcode%>"><input type="hidden" name="elqFormName" value="ACCT_CenterWebPages"><input type="hidden" name="elqSiteID" value="2470"><input type="hidden" name="elqCustomerGUID" value=""><input type="hidden" name="elqCookieWrite" value="0"><input type="hidden" name="pageURL" value="http://<%= request.serverVariables("SERVER_NAME") %><%= request.serverVariables("URL") %>"></form> And has this code: <% 'declare vars for sending email Dim bReturn, dtSendDate Dim sMailSubject, sMailBody, sMailFromAddress, sMailFromName, sMailToAddress, sMailToName dim sendemail,emailbodytext,refererror sendemail = "" sendemail = Request("sendemail") refererror = "" Function IllegalChars(sInput) Dim sBadChars, iCounter IllegalChars=False sBadChars=array("drop", "--", "insert", "delete", "xp_", "#", "%","(", ")", "/", "\", ":", ";", "<", ">", "=", "[", "]", "?", "`", "|") For iCounter = 0 to uBound(sBadChars) If Instr(sInput,sBadChars(iCounter))>0 Then IllegalChars=True End If Next End function If sendemail = "rac" Then dim str_name, str_companyname, str_phone, str_email, ephonelen, str_refname, str_refcompanyname, str_refphone, str_refemail, str_terms str_subscribeid = Request("subscribeid") str_name = Request("name") str_companyname = Request("companyname") str_email = Request("email") str_enewsletter = Request("enewsletter") str_printnewsletter = Request("printnewsletter") if (str_name = "Your Name") or (str_email = "") or (str_companyname = "Your Company") then refererror = "missinginfo" end if If IllegalChars(str_name)=True OR IllegalChars(str_email)=True Then refererror = "dataintegrity" End If if refererror = "" then emailbodytext = "subscribeid | name | company | email | enewsletter | printnewsletter | " & Request("subscribeid") & " | " & Request("name") & " | " & Request("companyname") & " | " & Request("email") & " | " & Request("enewsletter") & " | " & Request("printnewsletter") dtSendDate = Now() sMailSubject = "PMI Subscription - Accountant Client Capture" sMailBody = emailbodytext sMailFromAddress = "webmaster@surepayroll.com" sMailFromName = "Webmaster" sMailToAddress = "AccountantInfo@surepayroll.com" sMailToName = "Francesca Zelasko" bReturn = oCustServ.SendMessage("----", 99, sMailFromAddress, sMailFromName, sMailToAddress, sMailToName, sMailBody, sMailSubject, dtSendDate) '============= CHECK FOR ERROR ================== if bReturn = False then bReturn = SetErrorInfo (1, "----", 0) '=========== END CHECK FOR ERROR ================ End If End If %> When I put all of this code on the same page, I get an error that reads: Microsoft VBScript compilation error '800a0411'Name redefined/Include/960/accountant/form_partnership.asp, line 3Dim bReturn, dtSendDate----^ I’m not an expert in ASP, so I’m not sure if the problem is obvious and I’m just not seeing it. Either way, is there any solution that will allow me to have both forms on the same page? Thanks in advance for any help.
  20. Ok, I'm getting a little confused so I will post all of my code. I want a popup to happen just like the form on this page: http://www.surepayroll.com/product/payroll/. Hit the submit button and you'll see the "pop-up" I'm referring to. Here is my form code: <script language="JavaScript" src="/surechoice/pminewsletter_check.js" type="text/javascript"></script> <form action="http://now.eloqua.com/e/f2.aspx" method="post" name="referaclient" onSubmit="return checkrefervalues();"> <img src="/images/960/accountant-center/form/partnership-top.gif" /><div class="partnership-form"><div class="fontsize18 lineheight22 bpadding10"><strong>Subscribe to Practice Management Insights</strong></div><div class="acct-field"><input id="firstname" name="LastName" size="24" maxlength="250" tabindex="1" value="First Name*" onfocus="if(this.value == 'First Name*') {this.value = "";}" onblur="checkFirstName()" /></div><div class="acct-field"><input type="text" id="lastname" name="LastName" size="24" maxlength="250" tabindex="2" value="Last Name*" onfocus="if(this.value == 'Last Name*') {this.value = '';}" onblur="checkIfEmptyOrDefaultvalue(this);" /></div><div class="acct-field"><input id="company" name="Company" size="24" maxlength="250" tabindex="1" value="Company*" onfocus="if(this.value == 'Company*') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Company*';}" /></div><div class="acct-field2"><input id="email" name="Email" size="24" maxlength="250" tabindex="1" value="Email*" onfocus="if(this.value == 'Email*') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Email*';}" /></div><div align="right" class="rpadding10">*Required Fields</div><input src="/images/960/accountant-center/form/partnership-submit.jpg" class="rpadding10" name="Submit" value="Submit" type="image" align="right" /></div><img src="/images/960/accountant-center/form/partnership-bottom.gif" class="iebottom bpadding15" /></form> And here's the pminewsletter_check.js file: function checkrefervalues(){ message = ""; function checkFirstName = function(){ var value = document.getElementById('firstname').value; if(value === "" || value === "First Name*"){ if(value === ""){ value = "First Name*"; }; //tell them that they need to enter their first name still }; }; if (message.length > 0){ alert(message); return false; } pageTracker._trackEvent('Accountant Forms', 'PMISubscription'); return true; } function checkemail(str){ var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i if (filter.test(str)) testresults=true else{ message = message + "Email address seems incorrect (check @ and .'s)\n" return false; } } function IsNumeric(sText) { var ValidChars = "0123456789"; var IsNumber=true; var Char; for (i = 0; i < sText.length && IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false; } } return IsNumber; } var isNN = (navigator.appName.indexOf("Netscape")!=-1); function autoTab(input,len, e) { var keyCode = (isNN) ? e.which : e.keyCode; var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46]; if(input.value.length >= len && !containsElement(filter,keyCode)) { input.value = input.value.slice(0, len); input.form[(getIndex(input)+1) % input.form.length].focus(); } function containsElement(arr, ele) { var found = false, index = 0; while(!found && index < arr.length) if(arr[index] == ele) found = true; else index++; return found; } function getIndex(input) { var index = -1, i = 0, found = false; while (i < input.form.length && index == -1) if (input.form[i] == input)index = i; else i++; return index; } return true; } All I want to do is get the popup to happen when a field is blank or has the pre-populated value.
  21. I had trouble getting this to work too. I copied everything you wrote and pasted the input into my form, and the javascript in my validation code. The form accepts blank fields with this code.
  22. Not sure, I simply searched for how to create javascript validation for a field based on the id and not the name, and that's what I found. Now I understand this is incorrect.
  23. I couldn't get this to work... copied and pasted exactly what you wrote. I don't get any pop up that tells me to enter First Name.
×
×
  • Create New...