Jump to content

Splurd

Members
  • Posts

    60
  • Joined

  • Last visited

Everything posted by Splurd

  1. working on a jsp page,there is a sql which gets a list of prerequisites.The RS is turned into a list of checkboxes which are like<input name="cb1" value="xxxxx" type="checkbox"><input name="cb2" value="xxxxx" type="checkbox"><input name="cb3" value="xxxxx" type="checkbox">usually I do my form validation with a simpleif (theform.txtName == "" ){ *prompt to fill in name textbox*}but how can I do a incrimental for the checkboxes?like turning this....if (theform.cb1.checked = false ){ *prompt to fill in checkbox*}if (theform.cb2.checked = false ){ *prompt to fill in checkbox*}if (theform.cb3.checked = false ){ *prompt to fill in checkbox*}into a dynamic loop which can just go thru all the checkboxes I have.
  2. As the topic says, anyone care to share their expriences of stopping sql injection, be it deliberate or otherwise.I ask this because, right now my form for a registration form has a field which allows the user to enter info about them selves and one of the things offten entered is quotes. both single and double...For example, they might enter something like [ Hi I'm into "fun" things. ] and the quotes mess up the sql.and I dont want to use html equivlent things like ' or " because its used in a java client server application as well, so it might come out weird.Any opinions? I know I need to catch and change them, but change them to what? hmm
  3. Its amazing what knowing the right keywords to google for can do for youanyway this site gives a long list, just to sharehttp://www.searchtools.com/tools/tools.html
  4. sorry but I dont understand you and i dont think that quite solves my issue.I'm using <xsl:tempate > and its matching the nodes in my xml,What I need to do, is when it reaches a specific node (which i check via a if ) it needs to go BACK to the previous node, and take a attribute. then go FORWARD to the next node, and take a attribute,
  5. lets say I got a list of notes, and I'm using template match to organise the data, then I need to do a prev, next for page, to go to the next product page.I know which node I'm in, but I need to somehow get the ID of the previous node...eg <inventory> <product> <prod_id>21</prod_id> <prod_name>peanut butter</prod_name> <prod_price>500</prod_price> </product> <product> <prod_id>453</prod_id> <prod_name>jelly jam</prod_name> <prod_price>200</prod_price> </product> <product> <prod_id>341</prod_id> <prod_name>mystery spread</prod_name> <prod_price>1337</prod_price> </product><inventory> right now using <xsl:template match="xxx"> to go thru them, and using position() gives me a index number, but is there a way to use that to jump around the nodes?
  6. my xml is sorted like this, <staffdirectory> <staffnames> <staffname> <id>123</id> <name>bob</name> </staffname> <staffname> <id>456</id> <name>joe</name> </staffname> </staffnames> <staffcategories> <staffcategorie> <code>1</code> <name>Management</name> </staffcategorie> <staffcategorie> <code>2</code> <name>Engineer</name> </staffcategorie> </staffcategories> <staffs> <staff> <id>123</id> <code>1</code> </staff> <staff> <id>456</id> <code>2</code> </staff> </staffs></staffdirectory> Trying to make a dropdown list where its likeManagementbobfredjaneDogbertEngineerjoeharryDillbertsomething like that.Also, is there a specify way of targeting a node? like selecting the staffname node which has ID = 123, and getting his name
  7. Bump again, see if anyone has more engines to recommend.
  8. Splurd

    Hiding A Table Row

    I re made the first post after discovering some things.
  9. Splurd

    <ol Type="a">

    The site I'm working on is kinda old, all the original coders have run away and frankly no one knows how it works anymore.Its full of bad practices and alot of hard coding, it does not have a doctype and the pages that do have a doc type are using the default one from dreamweaver. which is not a strict doctype. If fails validation badly.
  10. Splurd

    Hiding A Table Row

    I complete redid the thread <html xmlns="http://www.w3.org/1999/xhtml" ><head><title>test</title><script type="text/javascript">function removeElement(x){ if (document.getElementById(x).style.display == "table-row"){ document.getElementById(x).style.display = "none"; }else{ document.getElementById(x).style.display = "table-row"; } //alert(document.getElementById(x).style.display);}</script></head><body><ol style="list-style-type: lower-alpha;"><form name="rcform"><table border =1> <tr > <td colspan="2"> <input type="button" onclick="removeElement('row2')" value="Do not display row2" /><br/> <input type="button" onclick="removeElement('row3')" value="Do not display row3" /> </td> </tr> <tr id="row1"><td> 1 </td> <td>row1 </td> </tr> <tr id="row2"> <td> 2 </td> <td> row2 </td> </tr> <tr id="row3"> <td> 3 </td> <td> row3 </td> </tr> <tr id="row4"> <td> 4 </td> <td> row4 </td> </tr> <tr id="row5"> <td> 5 </td> <td> row5 </td> </tr> </table></form></body></html> Using the HTML DOM displayI'm using style.display = none and style.display = table-rowIt works fine in firefox. However IE rejects the style.display = table-row. It says could not get the display property. Invalid argument.So what am I doing wrong, or is there a easier way of doing this?
  11. Yep, but its not a internal search. They want it to be internal, rather then being linked to google. Aye, thats is one of the options, but I'm searching for more. Pointy haired managers dont like paying for services. Yes you have helped :)Just need to find more of these search tools
  12. Splurd

    <ol Type="a">

    What I meant was, in my original post, I was listing out items, by hard coding them using tables and manually typing in a. b. c. It was not using <ol> Dont just look at the code and say that its not a list >_<I didnt use definition lists because they wanted it to be in a list format, with a. b. c. ectan uhhh, the site does fail validation miserably. But its complex and messy and will be "revamped" eventually. So I'm not really concerned with correct or wrong, as long as it displays properly in the browsers.
  13. lets just say due to the way the db is made its not feasible to do such a thing.Its most definitely not what they are looking for
  14. The site will be going thru a "revamp" so its not comfirmed yet, but as for the moment, most of the articles are stored in a database in html format.
  15. I've been tasked to evaluate what search engine to use, for internal searches of the site. And I've really got no idea how to go about doing this. (its like asking a car mechanic to design a formula 1 engine)Any one care to share their views and expereinces win internal website search engines, and what are the popular ones around?I know google offers a search application, along with another company called thunderstone. (found this article)But I dont know if that is what I'm looking for.wikipedia has a list of free search engines, but again I dont know if this is what I'm supposed to be looking for.So anyone with more experience can tell me, what exactly should I be researching.
  16. Splurd

    <ol Type="a">

    Well, if you did a simple copy past and look at the code I orignally posted, it shows a list, but its hardcoded out.Anyway, thru some experimentation I find that this method works.<ol style="list-style-type: lower-alpha;"> <li>url goes here</li> Description goes here<br><br> <li>url goes here</li> Description goes here<br><br> <li>url goes here</li> Description goes here<br><br></ol>
  17. Splurd

    <ol Type="a">

    Still new to css, so excuse me if I dont use it much :)Tables still appeal to me as the easiest way to organize text. And I have to achieve browser neutrality so it will display fine in all browsers. (well focus is on IE and firefox mostly)But the world of css does seem very versatile.
  18. Splurd

    <ol Type="a">

    I learned html a long time ago (3?4? years ago)and now I'm in a job as a webdeveloper. so the concept of depreciated HTML is new to me I only realised this when IE started misbehaving. Anyway, so I'm looking thru the html tags and see some of the depreciated, in particuar ol's type attribute. And right now I'm trying to get a ordered list like this <table border="0"> <tr> <td colspan="2">a.<a href="/ect/html"> URL goes here </a></td> </tr> <tr> <td> </td> <td>I use tables due to long text descriptons which go to 2nd line. So tables to make them aligned</td> </tr> <tr> <td colspan="2">b.<a href="/ect/html"> URL goes here </a></td> </tr> <tr> <td> </td> <td>I use tables due to long text descriptons which go to 2nd line. So tables to make them aligned</td> </tr> <tr> <td colspan="2">c.<a href="/ect/html"> URL goes here </a></td> </tr> <tr> <td> </td> <td>I use tables due to long text descriptons which go to 2nd line. So tables to make them aligned</td> </tr></table> I'm in a tad of a rush, so I'm not going to edit the css file but use inline css, and how can I get it done with css? Basically want to know how to do a. b. c. instead of 1. 2. 3.And is there a way to break the numbering and start again.:edit btw very sorry if this sounds like I'm too lazy to take my thumb out of my arse and learn the basics my self but like I said, in a bit of a rush >_< :
  19. Hmm thanks for pointing that out. So, what should my doctype line look like?I use tables because it just seems easier to manage. I never used divs before and I'm not good with CSS Wouldnt even know how to do it without tables.The table I'm using is nested inside another table, and the page I'm editing is already all nice a formatted out so I dont really want to go to my superior chanting "revamp! revamp!" =p
  20. I'm having problems with IE properly displaying a table. (displays fine in other browsers like firefox)My intention is to form a table, with multiple rows, but the bottom row is aligned to the bottom. The first row contains a image and is fixed at the top, and the bottom row has the footer image and is aligned at the bottomSo I've used <tr valign="top"> and <td valign="bottom">however it doesnt turn out correct in IE but ok for firefox. And thru some trail and error I pin point the difference in <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Adding this line causes IE to act abnormal, and after some googling I realize its not something I can just take out. (because all the pages in the site has it, and I'm not the original maker of the site)So, any ideas? for the moment I hard coded it abit with a 3rd table row with a manually inputed heigh, but if we add more rows to the table its going to be troublesome to keep editing this height. here is the code for a simple table which demonstrates my problem. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><head><title>Untitled Document</title></head><body><table height="630" width="194" border="1"> <tr valign="top"> <td height="38"><div align="right"><img src="images/Home_04.gif" width="194" height="38"></div></td> </tr> <tr valign="top"> <td>Some content here </td> </tr> <tr> <td valign="bottom"><img src="images/Home_07.jpg" width="194" height="63"></td> </tr> </table></body></html>
  21. My boss want to know which country and organisation an IP is from so they have a better idea of who visits them. Is there an easy way to do this?
  22. I cannot use servers because this is being burn on a CD to be passed to customers.I dont need to write to the database, only to read from it.The database contains a catalague of products. I need to make a webpage, that can read from this database and display the data. And all of this should be on a CD so its portable and no internet access is needed.
  23. I have a database. (whoopie)I have a cd. (whoopie)I have to get some way to get data from the database when its burnt onto a CD. (o crap)I have no idea how to do this, so was thinking if it was possible to do it via javascript. Or any other language. Or any easy method.
  24. I have a static IP address. (which irks me to no end) And the speed here is not an issue, My main goal is to get a website up and running, with as little cost as possible. (aka no cost)Didnt think my humble thread would generate a heated discussion about hosting and servers and uh, drinking habbits. ;p But to be truthful I dont think I will be in need of such a secure system.I knew of a guy who set up his webpage from his home pc, using windows and using ISS. Thats kinda what I am aiming for. Though I would consider getting a hosting service because its more efficent, I still am curious as to how to host on a home pc.
  25. Most of the time, I've been using either my collage servers or my the server at my workplace to host my files and do my stuff. But all of those were already set up and I basicly just ftp over and run it. I have very little knowlage of networking and such.Anyway, my parents want their lovely little IT wiz kid to make them a website, and I am not very sure of how to host it. Whilst I am aware of sites that offer hosting services, I was thinking of using my PC at home to be my server and host the site since it is basily on 24/7.So can anyone point to me a guide on how to host a website using your own computer as a server? And getting domain names etc.
×
×
  • Create New...