Jump to content

aspnetguy

Members
  • Posts

    6,787
  • Joined

  • Last visited

Everything posted by aspnetguy

  1. aspnetguy

    Simple Query

    are all 3 fields precoprod, dinheiroprod, and vendasprod a numberic datatype (ie INT)?
  2. no that won't work you need 2 loopsCan you explain the situation, I don't quite understand what you are doing. You have 2 drop downs and when you select an option in drop down 1 it removes the option with same index in drop down 2???
  3. oh, I'm not sure about that
  4. you could do this ...<body><div style="border:1px solid #000"><!-- all your code here --></div></body></html>
  5. aspnetguy

    Simple Query

    what error do you get?your where condition is probably returning more than 1 result which is not allowed.
  6. I don't know about XP but transparent apps, etc is one of the features of Vista.
  7. yup it reads it all it will returnt he value of whatever querystring variable you tell it too (as long as it is there of course)
  8. You have a few options1. use frames (not recommended)2. have the flash the same on all pages and load with each page3. use ajax to load body content
  9. Were your issues with response.XML becuase you were unfamiliar or because it behaves oddly?I have been planning to use AJAX in my next project and retreiving XML as apposed to just printed html and text to the screen would be far more helpful.I suppose I could always just have the server side write the xml as output and load it in JS myself.
  10. This is a script I pulled of the net a while ago and it is great! /* Client-side access to querystring name=value pairs Version 1.2.3 22 Jun 2005 Adam Vandenberg*/function Querystring(qs) { // optionally pass a querystring to parse this.params = new Object() this.get=Querystring_get if (qs == null) qs=location.search.substring(1,location.search.length) if (qs.length == 0) return// Turn <plus> back to <space>// See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1 qs = qs.replace(/\+/g, ' ') var args = qs.split('&') // parse out name/value pairs separated via & // split out each name=value pair for (var i=0;i<args.length;i++) { var value; var pair = args[i].split('=') var name = unescape(pair[0]) if (pair.length == 2) value = unescape(pair[1]) else value = name this.params[name] = value }}function Querystring_get(key, default_) { // This silly looking line changes UNDEFINED to NULL if (default_ == null) default_ = null; var value=this.params[key] if (value==null) value=default_; return value} to use it you do this var qs = new Querystring();var var1 = qs.get('var1');
  11. change onChange="removeOptions(this.value);" to onChange="removeOptions(this);" That will solve the selectbox has no properties error. Anymore errors?
  12. can you post your whole page and I'll debug it.
  13. aspnetguy

    Link

    ...<body><a href="#bottom">Bottom of Page</a>...whole bunch of stuff...<a name="bottom"></a></body></html>
  14. replace selectbox.options.selected.value with selectbox.options[selectBox.selectedIndex].value and replace process.remove(i); with process.options[i] = null);
  15. document.getElementById('yourSelectBox').options[index] = null;
  16. you cannot set text as a background. You will have to put the text on an image and set the image as the background.
  17. There are no requirements to taking the exam except having $59
  18. try this <html><head> <title>Bolded Links OnClick</title> <script type="text/javascript"> onload = init; var links; function init() { var container = document.getElementById('links'); links = container.getElementsByTagName('a'); for(var i=0;i<links.length;i++) { links[i].onclick = function(){boldLink(this);} } } function boldLink(link) { for(var i=0;i<links.length;i++) { links[i].style.fontWeight = 'normal'; } link.style.fontWeight = 'bold'; } </script></head><body> <div id="links"> <a href="#">Link 1</a><br/> <a href="#">Link 2</a><br/> <a href="#">Link 3</a><br/> <a href="#">Link 4</a><br/> <a href="#">Link 5</a><br/> <a href="#">Link 6</a><br/> </div></body></html>
  19. you can use frames (gross!) or use a overflow div <div style="width:200px;height:600px;overflow:auto"></div> If the contents of the above div exceed the set width and height, scrollbars will appear inside the div
  20. I don't think having an AJAX forum is any different than a DHTML forum
  21. This belongs in this topic...http://w3schools.invisionzone.com/index.php?showtopic=3770
  22. ok here is what I have so far, it is not complete yet. It removes <style></style> and <meta> and catchs most tags with attributes in them but misses tags like this #include <windows.h>#include <iostream>#include <string>#include <stdio.h>using namespace std;string fileName;string outFile;string contents;string tmp;string strRemove;FILE * pFile;long lSize;char * buffer;int start;int end;int main(){ cout << "Enter path and file name to load: "; cin >> fileName; //cout << "Enter path and file name to create: "; //cin >> outFile; pFile = fopen(fileName.c_str(),"r"); if(pFile == NULL) { cout << "Could not open file! Exiting..." << endl << endl; system("pause"); exit(1); } //obtain file size. fseek(pFile , 0 , SEEK_END); lSize = ftell(pFile); rewind(pFile); //allocate memory to contain the whole file. buffer = (char*) malloc(lSize); if(buffer == NULL) { cout << "Error initializing buffer! Exiting..." << endl << endl; system("pause"); exit(2); } //copy the file into the buffer. fread(buffer,1,lSize,pFile); contents.assign(buffer); //remove <style></style> if(contents.find("<style") != string::npos) { start = contents.find("<style"); end = contents.find("</style>") + 8; strRemove = contents.substr(start,end-start); contents = contents.replace(contents.find(strRemove),strRemove.size(),""); } //clean remaining HTML tags tmp = contents; int loop = 0; int s; string oldTag; string newTag; while(tmp.find("<") != string::npos && loop < 100000) { start = tmp.find("<"); end = tmp.find(">"); tmp = tmp.replace(start,1,"["); tmp = tmp.replace(end,1,"]"); oldTag = tmp.substr(start,end-start+1); if(oldTag.find(" ") != string::npos) { s = oldTag.find(" "); newTag = oldTag.substr(0,s) + "]"; tmp = tmp.replace(tmp.find(oldTag),oldTag.size(),newTag); //cout << newTag << endl; } loop++; } while(tmp.find("[") != string::npos && loop < 100000) { start = tmp.find("["); end = tmp.find("]"); tmp = tmp.replace(start,1,"<"); tmp = tmp.replace(end,1,">"); loop++; } while(tmp.find("<meta>") != string::npos) { tmp = tmp.replace(tmp.find("<meta>"),6,""); } contents = tmp; cout << tmp << endl << endl; system("pause"); //close file and free memory fclose(pFile); free(buffer); return 0;}
  23. then you need to get the size of the frame if everything is set to 100%
×
×
  • Create New...