17,029 Solved Topics
Remove Filter ![]() | |
I need to include a "variable" in my regex that will be different each time it is called. Very fustrated, this would have taken 2 seconds in Perl. Here is my code: [code=javascript] for (y=0; y < response.length -1; y++){ var _row = response[y].split(':'); var str = "_row[1]"; if(str.match("/^"+_inputText.value+"/i")){ _responseText … Web Development javascript perl regex | |
Hello I've a question when creating a class with functions. e.g. [CODE=javascript] function constructor() { this.myFunc = function() { return "Hello World"; } } [/CODE] do I have to write the function in that way? this.funcName = function() for every function in that class? Because when I tried to write … Web Development javascript | |
Hi everyone, I'm embarrased to ask as I am so new at this but here goes anyway: I have been trying to create a simple secure login screen that when successfully logged into, will allow the user access to other services. I found, modified a good tutorial and all works … | |
Hello. I'm trying to get working some AJAX make statistics of links clicked. Using php and mysql as back-end. My choice is synchronous AJAX request to server using onbeforeunload event. I'm using synchronous request to be sure that browser sent request to the server before page is unloaded. With asynchronous … Web Development javascript | |
If, in Firefox, you go to [URL="http://www.incrowd.org.uk"]http://www.incrowd.org.uk[/URL] you'll see a signin page. The signin form is a table and should be spaced 35%/65%. However it is just taking up the space needed for the left label. I've got Firebug and the problem is the table is not taking up 100% … Web Development javascript | |
[CODE]<? include("db.php"); mysql_connect($host,$username,$password); @mysql_select_db($database) or die("Unable to connect to database"); $query="SELECT * FROM tcg"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); echo "<center>Viewing Records</center>"; $i=0; while ($i < $num) { $client = mysql_result($result,$i,'ClientsName'); [B]$prgno = mysql_result($result,$i,'PrgNo'); this is line31[/B] $prgname = mysql_result($reslt,$i,'PrgName'); $trainername = mysql_result($result,$i,'TrainerName'); $dates = mysql_result($result,$i,'Dates'); $days = mysql_result($result,$i,'Days'); $proffee = mysql_result($result,$i,'ProfFee'); … | |
Hello, I am retrieving two values from a database. I want to get the result after addition of the two values. the code I used is [CODE]echo "$client <br> $prgno <br> $prgname <br> $trainername <br> $dates <br> $days <br> $proffee <br> $trainerfee <br> $reimbexp<br> $handoutchg <br> $invoiceno <br> $totalinvamt <br> … Web Development php | |
Dear all, I want to inform that the query return zero result? does anyone know how to revised my code so in case my query return zero result and it will echo "search result =0" here is my the code, I have try it but still it doesn't inform that … Web Development php | |
I would like to query regulation which it's date reminder is >= today and it's date ended is >=today. So I came with this query: [code] $query="select * from t_regulation where dt_reminder >= '$today' and dt_ended ='$today'" [/code] It works on postgerSQL but not on mysql :( I dont why … Web Development php | |
Hi! After many years of not doing any web design at all, I have a neighbor that has hired me to design a basic website for her business. I've set the page up with an iframe because I figured then I would only have to update menu links on that … Web Development html-css javascript web-design | |
Ok I am making a website and I have apache 2, php, mysql. I want users to be able to create a website(i got that part, it is easy) but I want user.example.com to redirect to example.com/user with a .htaccess file and sorry this is in the wrong section can … | |
Hello, I'm getting an error [B]"Column count doesn't match value count at row 1"[/B] [CODE] <? include("db.php"); $ClientsName=$_POST['client']; $PrgNo=$_POST['prgno']; $PrgName=$_POST['prgname']; $TrainerName=$_POST['trainer']; $Dates=$_POST['dates']; $Days=$_POST['days']; $ProfFee=$_POST['fee']; $TrainerFee=$_POST['trainerfee']; $ReimbExp=$_POST['rexp']; $HandoutChg=$_POST['handchg']; $InvoiceNo=$_POST['invno']; $TotalInvAmt=$_POST['invamt']; $FeeRecd=$_POST['feerec']; mysql_connect($host,$username,$password); @mysql_select_db($database) or die("Unable to connect to db"); $query = "INSERT INTO tcg VALUES('$ClientsName','$PrgNo','$PrgName','$TrainerName','$Dates','$Days','$ProfFee','$TrainerFee','$ReimbExp','$HandoutChg','$InvoiceNo','$TotalInvAmt','$FeeRecd')"; mysql_query($query) or die(mysql_error()); mysql_close(); echo "Data … | |
hi, how to use the window onload event on javascript.. for example i got a function and i want that function to execute during page load. any ideas is greatly appreciated... thanks... Web Development javascript | |
Hey Guys, I need a little help. I have a calendar script that I want to write a query for and pull out the day of the week, then have it send an email showing all the entries for that day. Unfortunately i'm querying a day, month, year as seperate … Web Development php | |
[code=php] if(!$sqlStr==$sqlStr1){ echo $sqlStr; }else{ echo $sqlStr; echo "<br>"; echo $sqlStr1; echo "<br>"; echo "No changes were made!<br>"; } [/code] This statement produces the same results whether or not the "!" statement is included. e.g. [icode]if(!$sqlStr==$sqlStr1)[/icode] produces the same results as [icode]if($sqlStr==$sqlStr1)[/icode] Why? Web Development php | |
i need to write a function to remove consecutive slashses from a string i wrote this [code] for( i=0; i!=b; ) { var slashone = strname.indexOf('/',i+1) i=slashone var slashtwo = strname.indexOf('/',i+1) i=slashtwo //alert("index of slash one" + slashone) //alert("index of slash two" + slashtwo) if( slashone == (slashtwo-1)) { alert("Remove … Web Development javascript | |
This is the sample table : [CODE] CREATE TABLE contacts ( id character varying NOT NULL, CONSTRAINT pkey_id PRIMARY KEY (id) ) [/CODE] I use PHP with PostgreSQL database..if i will run my PHP code: Example: ADD ID NUMBER <-- If i will click this, the message below will appear: … Web Development php postgresql | |
Hi Im hoping some fresh eyes will show me the issue here, been stuck on this for a while now... [code] $c = 0; for($i = 86400; $i < 604900; $i + 86400) { $start = $mktime - $i; $end = $mktime - ($c * 86400); echo $start . '<br … Web Development php | |
Can someone please help me figure out what I am doing wrong? Basically I have a form where users enter a bunch of values. On submit, the form values are dumped into a table in the DB. The process is as follows: Users enter a set of values TWICE for … Web Development algorithm coldfusion | |
Hi, I need an effect like in this linkhttp://markgrantcables.co.uk/shop/ I simply put a "?" mark next to a textarea. When mouse is over "?" then a little explanation box will appear. Thanks Web Development javascript | |
Hello all... Can i write all my site pages such as index.htm, support.htm,contact.htm .. etc to [url]www.mysite.com[/url] with URL Rewriting.. Please help on this.. Thanks in Advance.. Web Development php | |
Hi, Can anyone suggest me the best browser (IE or Firefox) for working of JavaScript. If IE, vat version..?? And why..??? Im using Mozilla Firefox, But people are telling me that IE is best... Please suggest me. Web Development javascript | |
int test = numbers.length; if (numbers[i] = test) { } i want to find the last array in numbers then do something with it for example out put it the above code is my attepmtp at it however i am doingd something wrong and cant for the life of me … Web Development java-jsp | |
I am very new to this.. I have used a repeater control and it fetches about 100 records from the database. Inside the repeater control, I am having 4 columns and in one column, I hav used one dropdown list as [code=asp.net] <asp:DropDownList ID="st" Runat="server" AutoPostBack=true OnSelectedIndexChanged="go_change" CssClass=rtd Runat=server> <asp:ListItem … | |
Hello, My brother asked me to create an application where he can save all his data and retrieve at any time, which does all the calculation. A friend of mine suggested PHP and MySQL would be a better option. I know HTML and CSS but very little of PHP. As … | |
hello, i was wondering if there is a way to automatically crop a picture, or only show a specific part of it with javascript. i dont know if this is important or not, but i want the cropped picture to fill the div its in, no matter what size the … Web Development javascript | |
Hi, I am not sure what i am doing wrong. I got my code (below) basically it is to resend user activation email if they for some reason or other did not get it first time etc. It sends the email and everything etc... what i need to do it … | |
Hi there I'm trying to cycle through entries inside a MySQL db and create numbered variables inside a for loop. Currently it doesn't seem to be working. Here's an example of what I'm trying to do: [CODE=php] $i = 0; while($row = mysql_fetch_row($result)) { $i++; $variable.$i = $row[0]; } echo … Web Development php | |
Hi, Hoping someone can help me. I done a search on Google but must not be using correct search term as cannot find anything. Basically how can i make sure a page is only accessed via a certain link? I have a page that user clicks on that opens a … Web Development php ![]() | |
Hi!! i need to write a function that counts the number of names seperated by a '/' for example if i write aashish/ankush in a field the number returned should be 2 thanks.... Web Development javascript | |
Hello, I was wondering if you can extract an item from a rss file and display it in a div. like extract the title and put it in an h3 tag, extract the description and put it in a paragraph, and have the link below, and all automatic, so you … Web Development display javascript | |
sorry about the bad title, but this is a code that takes a string, defined in an array, and converts it to the next string in the array by replacing letters one at a time. it works fine, but i want some modifications. code: [CODE]function scroll(message_loop) { var messages = … Web Development javascript | |
hello everyone, I am stuck with this problem.If anyone could help me, it would be a great favour. I am working on a leave application. Here the leaves are been applied by employees and accordingly the leaves are been approved or cancelled. so the problem is that when i am … Web Development java-jsp | |
Hi Guys/Gals I have a page that has iFrames on it. Now the pages that are shown in the iFrames each have their own code on them. I'd like to know if it's possible to use variables that are on the page holding the iFrames in the pages inside the … Web Development php | |
Dear all, I use asp:button field in my gridview [CODE] <asp:GridView ID="GV" runat="server" DataSourceID="SDSInHouseRate" Width="100%" AutoGenerateColumns="False" OnRowCommand="GV_RowCommand" OnRowCreated="GV_RowCreated"> <Columns> <asp:buttonfield buttontype="Button" commandname="edit" text="Edit"/> <asp:buttonfield buttontype="Button" commandname="approve" text="Approve"/> <asp:BoundField DataField="Seq" HeaderText="Seq" SortExpression="Seq" /> <asp:BoundField DataField="CurrencyID" HeaderText="CurrencyID" SortExpression="CurrencyID" /> <asp:BoundField DataField="EffectiveDate" HeaderText="Effective Date" SortExpression="EffectiveDate" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False" /> <asp:BoundField DataField="Remark" HeaderText="Remark" SortExpression="Remark" /> … | |
Hi There, I'm tinkering with an idea of a database structure for the company i work for, i'm currently compiling a client list using mysql and accessing it via php. The problem i have come across yet not solved is, when i search the database for a surname i would … Web Development data-structure php | |
hello, the title basically sums it up. how can i see if a word is in a url and then if it is, do something with it. thanks for any help billy Web Development javascript | |
[code]<script type="text/javascript"> function counter() { var first; var number; if (first == ""){ var first = 42; var number = 0; }else{ var number = number++; } var full = 7; var length = strlen(number); var full = full - length; for (i=0;i<full;i++){ document.getElementById('counter').innerHTML = document.write('<img src="images/0.gif" border="0">'); } for … Web Development image javascript | |
Hey all, I found this script that i'm using to read a directory, show all the pdf files in it, then be able to click on one of the pdf files displayed and open the pdf. So far i can show the pdfs in the directory, but when I click … | |
Hello! I am a n00b to both PHP and Javascript, so please bear with me... I have a form and I use Javascript to validate the form. If there is an error on the for it displays the appropriate alert. The problem I have is when I click "OK" on … Web Development javascript php | |
I'm somewhat new to PHP. I'm not sure how to point to the root of my web site in a function. I was using $_SERVER["DOCUMENT_ROOT"], but when I use it in my function it comes back: "http://mywebsite.com/var/www/html/mypath" Note - this is in the HTML - other parts of the function … Web Development php ![]() | |
hi, can anyone help to explain this code.. or is their an equivalent vbscript for this code? please help...don't know about javascript.. thanks in advance.. [code] if(arguments.length == 3){ var result = "<" + arguments[1] + ">"; for (var i = 0; i < arguments[2].length; i++){ result += "<li>" + … Web Development javascript vbscript | |
i have listbox 1 which displays status , based on selection of status listbox 2 displays usernames. and based on username selected the textbox displays the email id. its working fine till displaying user names in listbox 2 based on selected of status in listbox. but its not displaying the … | |
Hi, I want to Compare & count elements in array?? suppose in my array $arr={140,123,34,140,23,123,140,140,123} I want to display like 140 - 4 ( comes in array 4 times) 123 - 3 34 - 1 23 -1 How to do this?? Web Development php | |
hi , actually i am developing a web application in asp.net using c#. i have come across a requirement to read a excel file without going to the server . i need to use javascript for the same. so i need help on javascript function to read from excel file. … Web Development asp.net javascript web-server | |
hello, I am using visual web developer 2008. Here i want to use two menu which gets data from sitemap. In First SiteMap,I am having Home,Friends,Profiles and it is showing correctly in the first Menu. But in the second SiteMap i am having Social,Contact,General and when i try to choose … | |
Okay heres the problem i have stored Phone numbers from a check box into an array i want to replace #NUMBERS# in the String URL with a value from the array numbers[] example : number[1] = 0000 Before: url:[url]http://www.sendmessgae.com/send?#NUMBERS[/url] After: url:[url]http://www.sendmessgae.com/send?0000[/url] [code] String url = "http://www.sendmessgae.com/send?#NUMBERS" for (int i = … Web Development java-jsp | |
Hi, I get an error when i try to echo my cookie. [inlinecode]Notice: unserialize() [function.unserialize]: Error at offset 0 of 12 bytes in...[/inlinecode] I cannot find a solution. Help please. Thanks [code] class MyCookie { public function __construct($cookieName, $sessionId) { if(! isset($_COOKIE[$cookieName])) { $cookieValue["SESSION"] = $sessionId; setcookie($cookieName, $cookieValue, time()+60*60*24*7); } … | |
Does anyone have any ideas on how to change how submit buttons can be changed from the default? I think it is a real shortcoming of HTML that onmouseup and onmousedown etc are not permitted with <input type='submit'.... I just feel there must be some clever way using javascript or … Web Development php | |
Hi, I'm currently doing on a project, frankly speaking i'm new in javascript only know the basics. I'm not even sure whether this thread is suppose to be here or under html.. I'm suppose to create some codes that enable a html page to load to the next html page … Web Development javascript |
The End.