Jump to content

pulpfiction

Members
  • Posts

    1,210
  • Joined

  • Last visited

Posts posted by pulpfiction

  1. Try something like this...<% if catID = "" then %> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="160"><div align="center"> <a href="<%=strURLPath%>test3.asp?catID=1"><img src="assets_cm/FILES/image/bearings1.jpg" alt="<%=DoApostrophe(strProductTitle)%>" width="120" height="90" border="0"></a> </div></td> <td width="160"><div align="center"> <a href="<%=strURLPath%>test3.asp?catID=2"><img src="assets_cm/FILES/image/bearings2.jpg" alt="<%=DoApostrophe(strProductTitle)%>" width="120" height="90" border="0"></a> </div></td> </tr> <tr> <td width="160"><div align="center"> <a href="<%=strURLPath%>test3.asp?catID=3"><img src="assets_cm/FILES/image/bearings3.jpg" alt="<%=DoApostrophe(strProductTitle)%>" width="120" height="90" border="0"></a> </div></td> <td width="160"><div align="center"> <a href="<%=strURLPath%>test3.asp?catID=4"><img src="assets_cm/FILES/image/bearings4.jpg" alt="<%=DoApostrophe(strProductTitle)%>" width="120" height="90" border="0"></a> </div></td> </tr> </table><% Else %> <% if catID <> "" thenset rsP = objconn.execute ("SELECT * from products where catID=" & catID )while not rsP.eof%> <form action="test3.asp" method="post" name="textsubmitform" id="textsubmitform"><img src="assets_cm/FILES/image/<%=rsP("ximage")%>" border="0">   <%=rsP("name")%>  £ <%=rsP("price")%> etc etc..<% End if %>'This is the ENDIF for checking catID="".

  2. How does the new user registration work? was trying to create a account, but doesnt seem to be working. does it send a mail to user for confirmation? you must display some incorrect entry or registration complete or some kinda message....

    CMS

    I prefer to have a "template" that I load on the first line of my CMs apps. Then I proceed to replace template tags with database generate HTML that way in the end I get a clean HTML page.
    Can you give more details about templates, some links or anything......
  3. For Windows XP:Opening IIS:Open "Control Panel" and double click on "Administrative Tools".Then look for "Internet Information Services", double click.New window will open.Expand "Local Computer" [+] and next expand "[+] Web Sites" In that you will find your folder where asp file is. select that folder [files will list on right] Right click and goto properties of the particular asp file.Goto "File Security" tab and click on "edit" button under "anonymous access......" and do what justsomeguy asked to do...

    CMS

    Thanks guys....I might have to try out both methods, but method might work for my case as there is not fixed number of links, also the links are grouped into categories. and the number of groups are variable. so if im using a asp:repeater, then I need to create repeater on the fly. and may positioning it might get difficult..... Right???Menu would look something like this.GroupName1-Link11-Link12-Link13GroupName2-Link21-Link22-Link23

    CMS

    [ASP.NET 1.1/C#]I have to design something like a CMS. Its a intranet site which has an admin part who can modify the content of that intranet site. Im stuck up in how to create dynamic menus. Need some ideas of how to proceed, should I use datagrid or datalist or anything else to list out the links in menu whose URL and text is in database... also it has to be positioned on the left side. Any ideas?? Thanks.Pulpfiction.

  4. If you need a way to decode the URLEncode, try this.

    dim str str = Server.URLEncode("/open.asp")response.write(str)response.write("<br />")response.write(URLDecode(str))function URLDecode(sText)sDecoded = sTextSet oRegExpr = Server.CreateObject("VBScript.RegExp")oRegExpr.Pattern = "%[0-9,A-F]{2}"oRegExpr.Global = TrueSet oMatchCollection = oRegExpr.Execute(sText)For Each oMatch In oMatchCollectionsDecoded = Replace(sDecoded,oMatch.value,Chr(CInt("&H" & Right(oMatch.Value,2))))NextURLDecode = sDecodedEnd function

  5. Try something like this... by checking the number of rows the query returns. http://us3.php.net/mysql_num_rows

    <?php$name = $_GET['name'];$link = mysql_connect("localhost", "mysql_user", "mysql_password");mysql_select_db("database", $link);$query = "SELECT * FROM tablename WHERE name=".$name;$result = mysql_query($query, $link);$num_rows = mysql_num_rows($result);if ($num_rows>=1)echo "Name already in database";elseecho "Name does not exist in DB";?>

  6. Do you need something like this, a drop down list and when you change the option it popups the value of the selectedhttp://home.hetnet.nl/~hans-kuipers4/html/listbox.htm

    <html><head>	<title>My Listbox</title>  <script type="text/javascript">	function getValue(box) {if (box.selectedIndex == 0) return;alert(box.options[box.selectedIndex].value)}  </script></head><body><form name="my_form"> <SELECT id="box0" onchange="java script:getValue(this)"><option>Make your choice !<OPTION value="TEXTITEM1">Entry A<OPTION value="TEXTITEM2">Entry B<OPTION value="TEXTITEM3">Entry C<OPTION value="TEXTITEM4">Entry D<OPTION value="TEXTITEM5">Entry E<OPTION value="TEXTITEM6">Entry F<OPTION value="TEXTITEM7">Entry G<OPTION value="TEXTITEM8">Entry H</SELECT></form></body></html>

  7. Guess you cannot have nested <form>. thought you can have multiple form tags with seperate submit buttons.... like this.

    <body><form id="number_1" action="link_number1" method="POST">(...)<input id="btn_number_1" type="submit" value="Submit"> </form><form id="number_2" action="link_number2" method="POST">(...)    <input id="btn_number_2" type="submit" value="Submit">   </form></body>

  8. Guess function alert() {} will work best, it just prevents the popup, i didnt understand why

     be better, then I have to create a div element....   function alert(string){    document.getElementById("display").innerHMTL += string + "<br />";}
  9. Reason why I wanted to know that is cos, my friend has this login system which when the user registers in the website, it takes only login name and gives him 4-digit [numeric] as password, so i thought it would be easy to hack [just to prove its a bad idea]. If I know the login name then all I need is to use JS and fill the username textbox with that and loop through all 4 digit numbers and one of them will login. but the only problem is that every time when the login is incorrect it popups a message, if I could close it then loop will continue.... :)

×
×
  • Create New...