Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by dev

  1. Ok, let me write to them. thanks :-)
  2. Dear frenz, please share some ideas here. for some reason i have to run 64bit iis in 32bit mode which is working fine until i tried to access mysql database through odbc driver 5.1as my OS is 64bit, so i had to install 64bit odbc as well. now 32bit iis is throwing ODBC Drivers error '80004005' ([Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified) but tuning back the iis to 64bit performs the task well. Any ideas to make it work in 32bit mode?with thanksdev
  3. Sir,i have an arrays likea=1b=42c=5d=4e=11f=7 is it possible to sort them like b,e,f,c,d,a where the highest value kept on top.with thanks
  4. Sir, i was playing with split function and suddenly a question was raised, e.g. dim a,txttxt="a b c d e f g h i j"a=split(txt," ")for i=0 to 9 response.write a(i) & "<br>"next it will display txt from a to j, is it possible to display them j to a? if yes the how?your help is highly obliged.
  5. dev

    Create div dynamically

    Sorry for the confusion. yes i want to hide (css property - display:none) a div that i have created with function createDiv(); Actually i want to incorporate this functionality in user comment section. as users post their comments, this java functionality will show their post through ajax. so i want to keep the option to delete the post too by css property display:none and i will call a remote page to actually delete the post through ajax. thats why i wish to call a function through onclick event but am confused. please help.
  6. dev

    Create div dynamically

    Sir one more problem, kindly get me work the function cl(); here am attaching the code: ---------------- <html><head> <title>Javascript Create Div Element Dynamically</title> <style type="text/css"> .dynamicDiv { width:200px; height:100px; border:solid 1px #c0c0c0; background-color:#e1e1e1; font-size:11px; font-family:verdana; color:#000; padding:5px; }#ht{border:1px solid red;padding:6px} </style> <script type="text/javascript" language="javascript">var myText="<table><tr><td> <\/td><\/tr><tr><td>some text<\/td><\/tr><\/table>" function cl(){ } function createDiv(){var did="";var possible="abcdefghijklmnopqrstuvwxyz";for( var i=0; i < 4; i++ ){did +=possible.charAt(Math.floor(Math.random() * possible.length));}var divTag = document.createElement("div");divTag.id = did;divTag.className = 'setm';divTag.setAttribute('style','text-align:center')divTag.style.border = "1px solid #ccc";divTag.innerHTML = myText;par=document.getElementById('ht');par.insertBefore(divTag,par.firstChild)}</script></head><body><input id="btn1" type="button" value="create div" onclick="createDiv();" /> <div id="ht"></div> </body></html>---------------
  7. dev

    Create div dynamically

    eTianbun :-)Thank you so much :-) its working perfectly.
  8. Dear sir, I was trying to create a div element dynamically on top of another div(existing div) with javascript. I end up using these code: ------------- function createDiv(){var divTag = document.createElement("div");divTag.id = "div1";divTag.setAttribute("align","center");divTag.style.border = "1px solid #ccc";divTag.innerHTML = Date();document.getElementById("ht").appendChild(divTag);}--------------but this code creates div not on top but beneath. Kindly correct my code so that it will create div not beneath but on top.Your help is highly obliged.
  9. dev

    Server Info

    Hi, frensis it possible to know if a remote hosting server is running on 32/64 bit OS and a version of webserver?ASP/.netactually i have a component of 32 bit and want to install it in 64 bit... for that i need to know this info. please helpwith thanks
  10. dev

    Java Cookie

    Dear frens,Can u help me sorting this problem:in classic asp i write cookie as: Response.Cookies("ePortal")("ID")="blabla"and i read cookie values as: Request.Cookies("ePortal")("P12")now with javascript i know: document.cookie="ePortal"+"="blabla";now my question is - how can i create a cookie with keys using javascript as i did with asp?I will be thankful
  11. dev

    Php To Asp

    Sir,Please help me to convert this php code to asp<?php$result = array(); $result['time'] = date('r');$result['addr'] = substr_replace(gethostbyaddr($_SERVER['REMOTE_ADDR']), '******', 0, 6);$result['agent'] = $_SERVER['HTTP_USER_AGENT']; if (count($_GET)) { $result['get'] = $_GET;}if (count($_POST)) { $result['post'] = $_POST;}if (count($_FILES)) { $result['files'] = $_FILES;} if (file_exists('script.log') && filesize('script.log') > 102400) { unlink('script.log');} $log = @fopen('script.log', 'a');if ($log) { fputs($log, print_r($result, true) . "\n---\n"); fclose($log);} $error = false; if (!isset($_FILES['Filedata']) || !is_uploaded_file($_FILES['Filedata']['tmp_name'])) { $error = 'Invalid Upload';} if ($error) { $return = array( 'status' => '0', 'error' => $error ); } else { $return = array( 'status' => '1', 'name' => $_FILES['Filedata']['name'] ); // Our processing, we get a hash value from the file $return['hash'] = md5_file($_FILES['Filedata']['tmp_name']); // ... and if available, we get image data $info = @getimagesize($_FILES['Filedata']['tmp_name']); if ($info) { $return['width'] = $info[0]; $return['height'] = $info[1]; $return['mime'] = $info['mime']; } } if (isset($_REQUEST['response']) && $_REQUEST['response'] == 'xml') { // header('Content-type: text/xml'); // Really dirty, use DOM and CDATA section! echo '<response>'; foreach ($return as $key => $value) { echo "<$key><![CDATA[$value]]></$key>"; } echo '</response>';} else { // header('Content-type: application/json'); echo json_encode($return);}?>
  12. dev

    Php To Asp

    Hi, am afraid if i am posting in right cat. can anyone please translate this php code to asp<?php $id = $_GET['sessionId']; $id = trim($id); session_name($id); session_start(); $inputName = $_GET['userfile']; $fileName = $_FILES[$inputName]['name']; $tempLoc = $_FILES[$inputName]['tmp_name']; echo $_FILES[$inputName]['error']; $target_path = 'c:\\upload\\'; $target_path = $target_path . basename($fileName); if(move_uploaded_file($tempLoc,$target_path)) { $_SESSION['value'] = -1; }?>I will be thankful
  13. hi,I am constructing a small RTE for my forum and finally stucked in last turn. i am using iframe to do rte job done and its really working smoothly but didn't get any idea on how to retrieve the edited html values and store in database. so to do that i used an hidden input.<form name="myform<iframe name="myRTF" id="myRTF" class="EditControl" frameborder="0" onblur="UpDate()"></iframe><input type="hidden" id="readtxt" name="htmlval" /></form>the idea is to update the myform.htmlval.value with window.frames["myRTF"].document.body.innerHTML; this code work fine in IE6 and hopefully IE7 too but Opera don't support it. so i tried contentdocument.body.innerHTML too but nothing happened. this rte do not use textarea.i am not so good in java. so dear experts: is there any other way to retrieve the html values or help me to understand and solve the problem. i really din't understand why opera is not supporting window.frames["myRTF"].document.body.innerHTML?hope someone in this forum will save me :)with thanks
  14. dev

    how to save cropped image

    i am getting this error msg:Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.Source Error: Line 17: g.DrawImage(i, New Rectangle(0, 0, 400, 400), New Rectangle(0, 0, 200, 200), unit)Line 18: Response.ContentType = "image/jpeg"Line 19: b.Save("hh.jpg", ImageFormat.Jpeg)Line 20: Line 21: b.Dispose()
  15. hi,please help me, i am stucked here. i am using the following code to crop image to a certain with and height but how to save the cropped image? i am new to .net<%@ Page Language="vb" Debug="true" %><%@ import namespace="system.drawing" %><%@ import namespace="system.drawing.imaging" %><%@ import namespace="system.drawing.drawing2d" %><%Dim strFilename as StringDim i as System.Drawing.ImagestrFilename = Server.MapPath("horse.jpg")i = System.Drawing.Image.FromFile(strFilename)Dim b As New System.Drawing.Bitmap(400, 200, PixelFormat.Format24bppRgb)Dim g as Graphics = Graphics.FromImage(B)g.Clear(Color.Blue) Dim unit = GraphicsUnit.Pixelg.DrawImage(i, New Rectangle(0, 0, 400, 400), New Rectangle(0, 0, 200, 200), unit)Response.ContentType = "image/jpeg"b.Save(Response.OutputStream, ImageFormat.Jpeg)b.Dispose()g.Dispose()i.Dispose()%>Please tell me, with thanks
  16. dev

    iframe related

    Hi,I need help: here is the condition-There is a small iframe of 500*300px inside a page.html where a user have to do something and click ok button. By clicking ok button it suppose to refresh the page.html and i don't know how to do it.Please give me a way out.with thanks
  17. hi i am facing problem placing a loding indicator which parsing a remote xml file with microsoft.xmldom. here is the code:var _dc=document;function load(){try{xmlDT=new ActiveXObject("Microsoft.XMLDOM");}catch(e){try{xmlDT=_dc.implementation.createDocument("","",null);}catch(e){alert(e.message);return;}}xmlDT.async=false;xmlDT.onreadystatechange=function(){if (xmlDT.readyState == 1){_dc.getElementById('contarea').innerHTML='Loading, please wait...';}else if(xmlDT.readyState == 4){_dc.getElementById('contarea').innerHTML='Loaded successfully!';return false;}else{_dc.getElementById('contarea').innerHTML="Data can not be retrieved at this moment!!";}}xmlDT.load('remote.xml');}------------this doesn't show a loading text which the request is in the process but when loaded fully it show the readystate ==4 text.please tell me where i am doing wrong and how can it be solved?with thanksdev
  18. dev

    mysql related

    ah! i've index to english and see what happened---------mysql>EXPLAIN SELECT * FROM twipra_dict.data WHERE english='come';id | select_type | table | type | possible_keys | key | key_len | ref | rows | extra---------------------------------------------------1 | SIMPLE | data | ref | english | english | 203 | const | 1 | Using where---------1 row in set (0.00 sec)--------------bullseye
  19. dev

    mysql related

    i am using MySQL query browser v 1.2.8 beta provided by MySQL AB. from there i can see Indices = PRIMARY; Index type: BTREE and index column: IDID is set to auto inc. i am not that good in interpretating languages because i learn coding asp and designing database without theory class but from internet and books and examples. please elaborate a bit :)this is the sql structure:CREATE TABLE `com_dict`.`data` ( `ID` int(11) NOT NULL auto_increment, `english` varchar(200) default NULL, `abbr` varchar(100) default NULL, `kokborok` varchar(200) default NULL, `k_note` longtext, `e_note` longtext, `status` varchar(10) default '0', PRIMARY KEY (`ID`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;------------- running cmd -----mysql>EXPLAIN SELECT * FROM twipra_dict.data WHERE english='come';id | select_type | table | type | possible_keys | key | key_len | ref | rows | extra---------------------------------------------------1 | SIMPLE | data | ALL | NULL |NULL| NULL |NULL| 9619| Using where---------1 row in set (0.03 sec)----------- end run cmd -----this is the test result. is it ok?
  20. dev

    mysql related

    hi,i need experts openion. i am creating an online english to my language dictionary and i am using mysql to store all my data. for this i have created a table which contains over 9850 entries and there are 2000 more to be added later. i am using "Microsoft.XMLDOM" parser to collect data.everything is working fine however data collection has gone very slow.if i divide my database table and just enter 1000 entries per table than how will be the performance. or will it be the same as 9850 entries? how can i extract data faster?with thanksdev
  21. Hi,I was trying to set cookie domain property to my domain name, say www.abc.comI am trying this because i want to access this cookie for my entire website usage. Cookie is created by one of my subdomain (say. test.abc.com) so theoritically the cookie name will be cookie:name@test.abc.com/ and hence this cookie will be accessible only the test.abc.com; so i tried to setup cookie domain property to cookie:name@www.abc.com/ so that other subdomains can also access it but its not working.This is the code i am using:---------Line1: Response.Cookies("TP")=variablesLine2: Response.Cookies("TP").Domain = "www.abc.com"Line3: Response.Cookies("TP").Expires=now()+1---------Without Line2 the cookie works just fine with default domain name. can anyone know whats wrong and how the problem can be solved?with thanks
  22. Hi,i have just installed IIS7 win vista ultimate and had lots of problem running asp/.net pages. however now its running well.but now i can't access Microsoft Access Database with asp. i get the error saying "an error has occured accessing the page. please contact the system administrator". then i tried to set read/write permission to the folder where the database is but couldn't find where to set it.please help me solving this problem. i am not sure whether its becoz of the permission or some other problem.with thanksdev
  23. dev

    Make folder

    Problem is ASP do not know where to create your folder "test". you have to specify a physical/virtual path.either set f=fs.CreateFolder("C:\Inetpub\wwwroot\test") orset f=fs.CreateFolder(Server.MapPath("test"))it will be ok.
  24. dev

    Latest version of ASP

    Well ASP programmers can only count from 1 to 3. After that ASP.NET rules. ASP.NET is not an extended version of ASP, although few asp codes (asp classic) can still be used with ASP.NET but ASP is not fully compatible. ASP is vast and lots to know and discover. Try ASP.NET its simple yet complicated if you do not know vb/c langauge.
  25. Yes i agree. thats the only reasonable solution. thanks
  • Create New...