Jump to content

ashishrathore

Members
  • Posts

    20
  • Joined

  • Last visited

Posts posted by ashishrathore

  1. hello,i am running the Chat Applet and i am getting some runtime errorscan u help me in that(if possible)i had changed the chatfilename according to me and everything is set up-di am getting an error like this===================ERROR================================java.security.AccessControlException: access denied(java.net.SocketPermission [file:/C:/New%20Folder/dibella/Chat.java]resolve)========================================================some part of code i am giving...=====================CODE=============================public void run(){app.showStatus("sending");try{chatServer = new URL("http",app.getDocumentBase().toString(),cgiPath+"chat.cgi");chatServerConnection = chatServer.openConnection();chatServerConnection.setDoOutput(true);chatServerConnection.setDoInput(true);chatServerConnection.setUseCaches(false);chatServerConnection.setRequestProperty("Content-type","application/octet-stream");chatServerConnection.setRequestProperty("Content-length",""+completeMessage.length());DataOutputStream send = new DataOutputStream(chatServerConnection.getOutputStream());send.writeBytes(completeMessage);send.flush();send.close();app.showStatus("Sent");DataInputStream in = new DataInputStream(chatServerConnection.getInputStream());String reply;while((reply=in.readLine())!=null){System.out.println(reply);}in.close();}catch(Exception e){app.showStatus("Error sending chat");System.out.println(e.toString());}}======================================================can u help me out???thanx 4 reading...-ashish

  2. hi ,i had stuck into a prob. plz hlp me outit goes like thisthere is a table in my page with only 3 rows and no cloumnsin the second row i am using IFRAME property and the source of that is a file that is getting updates after an interval of few seconds, and i have also do the coding like the page gets refreshed after some time(can be 6-8 seconds of interval)now the prob. is ---- when that file gets bigger there is a scrollbar in it, its ok . but when the page gets refreshed after some time ,then the scrollbar gets reseted and the data in the scrollbar is seen from the very first line.What i want is the scrollbar should be able to present the last line in that rowdo u have any ideas???How can i do that??-ashish

  3. hi,i want to have an email broadcast part in my pageright now i am trying it locally with this code<?php// The message$message = "Hello World";$subject="Hello";mail("ashish@gmail.com", $subject, $message); ////// line 9?> then i m getting error like thisWarning: Failed to Connect in C:\Program Files\PHP Expert Editor\php2.tmp on line 9what should i do????-ashish

  4. hi,i am having a text file called subcat1.txt . in that i am having a single word in each line,i want to append some characters at the end of each line ----- ";#;";ie i want to append ;#; at the end of each lineplz help meiam also giving a link to that filehttp://www.xtremeswimwear.com/subcat1.txti know this is very easy thing bt i am not getting the desired outputplz do smthng-ashish

  5. hi,i am having prob regarding checking all/none checkboxeshere is a snapshot of that page that i want to refer Select Category : cat1 subcat11 subcat12 cat2 subcat21 subcat22 subcat23 cat3 subcat31 subcat323 cat5 subcat51 subcat52 subcat53 subcat54 cat9 subcat91 subcat92 all the cat are main categories and in front of that there are corrosponding subcategories subcatwhat i want is when i select a cat then all the corrosponding subcat must be selected mind u the problem is that all these categories and the subcategories are dynamically taken from a text file so it is not fixed for a certain number of lines.i had created the function using JS for this but when i select any cat all the subcat of all the categories are selected, so i want only the corrosponding subcat to be selected and not the all subcat.here is my JS functionfunction checkAll(checkname, exby) { for (i = 0; i < checkname.length; i++) checkname.checked = exby.checked? true:false } //////// but it check all the subcategories and not the corrosponding subcat.the code 4 checkboxes is smthng like this.....<input type=checkbox name="main[]" value="<?php echo "$mainh"; ?>" onClick="checkAll(document.pform.sub,this)"> ///this is the main category part <input type=checkbox name="sub" value="<?php echo "$subname"; ?>"><?php echo "$sub"; ?> /////this is 4 generating subcategories.plz help me.... -ashish

  6. hi,i want to pass a value that is selected from a dropdown box to different next pageand the value must be hiddenhow can i do that???code is something likke this.....-------------------------------------------------------------------------------------------------------<select size="1" name="cat" onchange=form1.submit()>for($kc=0;$kc<$clen;$kc++) ///////////these are the option values that i am taking from some other txt file. { ?> <option value="<?php echo "$clist[$kc]"; ?>"> <?php echo "$clist[$kc]"; ?></option> <?php } ?> </select><input type="hidden">i want some code for pasing the value of SELECT 'cat'.plz help me out-ashish

  7. hello all,thankx 4 ur all advice uptilll nwther is 1 more that i am stuc into,it goes like thisthere is one web page in which some checkboxes are displayed(these value i take from a text file) like this- SELECT SUBCATEGORY:--- i) Checkbox1 ii) Checkbox2 iii) Checkbox3 ............... ...............The code is smwhat like this....------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<?php $clines = file('temp.txt'); foreach ($clines as $cln) { ////foreach STARTS $data = explode(";",$cln); $length = count($data); ?> <input type=checkbox name="main[]" value="<?php echo "$mainh"; ?>"><?php echo "$data[0]"; ?><br> <?php for($j=1;$j<$length-2;$j++) { //////for starts $sub = $data[$j]; $subname = $mainh.$j; ?> <input type=checkbox name="sub[]" value="<?php echo "$subname"; ?>" ><?php echo "$sub"; ?><br> <?php } ?> }-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->>> now first of all i want to validate these checkboxes ie if no checkboxes are selected then it should prompt.>>>>> Other thing is when the selected checboxes are checked, then they must be posted to another page and from there they are saved to a text fileie. suppose Checkbox2, Checkbox5, Checkbox6 are checked then they must be posted to another page and after that they must be saved to a new txt file

  8. hi guys,i had got struc into a deep troubleplz help me outi am taking a line( in form of "s1;s2;s3;s4;s5;" something like that ) from a filecalled db.txtnow i want these s to take into an arrayi do this with the help of EXPLODE functionnw, when i start to print(or pass these values to sm other file) i get my result as Array (ie "Array" is printed) or "Array" is passed to the other filei want to print all those s in the file bt cant get thatplz help me out..for ur convenience i am giving the code that i am using--------------------code---------------------------------------------------------<?php$myarray=file('temp.txt');$h=0;foreach($clines as $c) { $clines=explode(';',$filename); $tmp=$c; $t[$h]=$tmp; $h++; } for($i=0;$i<$h;$i++) echo $l[$i]; ////////////////////// this prints "Array" instead of s's ///////}my text file is something like thissubcat11;subcat12;subcat13;subcat14;-------------------------------------------------------------------------

  9. hi,i want to know thathow to retrieve checkbox values from a form to anoter pagefor eg this is the code 4 me.......................................................................................................................<?php $mainh = 0; $subh = 0; $clines = file('temp.txt'); foreach ($clines as $cln) { ////foreach STARTS $data = explode(";",$cln); $length = count($data); ?> <input type=checkbox name="main[]" value="<?php echo "$mainh"; ?>"><?php echo "$data[0]"; ?><br> <?php for($j=1;$j<$length-2;$j++) { //////for starts $sub = $data[$j]; $subname = $mainh.$j; ?> <input type=checkbox name="sub[]" value="<?php echo "$subname"; ?>"><?php echo "$sub"; ?><br> <?php } /////////////////////////////////////////// for ends ?>

  10. hi,i am saving my database in a txt file in order like this..--------------------------------------------------- sub1;sub2;sub3;sub4;#; //// some line----------------------------------------------------Now i want these sub in a web page in yhe form of a checkboxescan u give me any suggessions.....thanx-ashish

    EOF

    hi,i am saving my database in a text file,line by line ,oknow when i delete 1 line in between, then in my web page i am getting that thing(empty) as i am showing those lines in a drop down boxsomething like this .............. --------TEXT FILE----------cat3;subcat31;#; //line 1cat4;subcat41;#; //line 2cat5;#; //line 3 //line 4-----EMPTYcat1;#; //line 5so i want to remove that EMPTY lineplz give me some suggessions, -thanks -ashish

×
×
  • Create New...