|
I'm building an online database and I've only just started in programming. I'm using HTML tags:
</select></td>
</tr><tr id="RwSatellite">
and option values, for a table that drops down so the user can select a satellite. After a selection is made I want the page to link to a display of information on the satellite (launch date, payload etc.) Any suggestions? As it is now when a satellite is selected it just links to another web site that I didn't build that's related to satellites. I did that intentionally because I wasn't sure how to start building the data base. I want to learn VB.NET and use operators for some fairly complex computations later but for now I just need to complete the front end to create a composite of basic data. How do I 'link' the selected object from the table to the actual data? I don't know terminology at all so I apologize. If you want (whoever answers this) I'll provide the link to my site. It's quaint but it's a start.
Thanx so much in advance,
Beams
|
|
|
|
|
ou will probably want to fill your combobox/drop down list using the serverside technology of choice.
I hate VB, so i've long since switched to PHP, this is what it would look like in PHP.
<select <code>onchange</code>="location.href='sat_list.php?pkid='+this.options[this.selectedIndex].value">
<?
$res = mysql_query('SELECT * FROM satellites');
for($i=0; $i<mysql_num_rows($res); $i++){
$row = mysql_fetch_array($res);
echo '<option value='.$row['pkid'].'>'.$row['name'].'</option>';
}
?>
</select>
What this code is doing is basically pulling your list of satellites from a database table and iterating each and outputting the name and pkid(Primary key - uniquely identifies any record within a table).
The pkid is used to indicate which satellite a user is interested in. What happens is most interesting inside the onchange() event.
Everytime someone changes a selection in the drop down list, it refreshes your current page or jumps to a different webpage used to display individual records (I personally like to keep all of my INSERT, UPDATE, DELETE, VIEW actions within a single file).
The script (see boldified code section) is not called normally however, instead we are also passing it a PKID using the GET method. Now the script you call in the onchange() event has the ability to determine exactly what satellite your visitor is interested in. So it's really a trivial matter of selecting that specific record and displaying as desired.
$pkid = (int)$_GET['pkid'];
$res = mysql_query('SELECT * FROM satellites WHERE pkid = '.$_GET['pkid']);
$row = mysql_fetch_array($res);
echo 'Satellite Name: '.$row['name'].'<br />';
echo 'Satellite ID: '.$row['pkid'].'<br />';
echo 'Satellite Location: '.$row['loc'].'<br />';
...etc and so on
HTH
Cheers
How do I print my voice mail?
|
|
|
|
|
Thanx again!
I'll start once more on it and hopefully I can complete it this time so I can move onto the math.
Beams
|
|
|
|
|
Hello, I have been tasked with getting a disclaimer on a page along with an attached database. So when the user accesses my webpage he will say yes he agrees thereby capturing his IP address and the date. If he says no nothing happens. I was told that ASP has does this very well. I was wonder if someone could give me some code or direct me to get me started.
Thanks.
|
|
|
|
|
I cant figure out how to make the background image smaller to fit inside the window. I'm doing it in CSS and here is what it looks like right now:
<body style="background: url(G:\My Documents\RyanKlein.com\images\cs10.jpg); background-attachment: fixed; background-position: center center;">
Can anyone tell me what tag it is to make it so it will automaticly resize the background?
Thanks much,
Ryan
|
|
|
|
|
Hello everyone!
Does anybody has a full RegEx in Javascript to test http urls?
Tnx!
Mariano, el estupefacto.
//TODO: Make this damn code work!
|
|
|
|
|
|
|
Yes, thanks, I know the page, it has great RegExs, but I was looking foward for something more 'Standard', like from w3.org, or IEEE, or so.
Because that expression isn't at all accurate for the use I want to give to it.
For example: http://HelloMyNameIsMariano matches with it. I'm looking for expression for Internet URL Addresses.
Thanks anyway. What I'm doing now is a System.Net.WebRequest, that way I can be sure the address is good and exists!
Bye!!!
Mariano, el estupefacto.
//TODO: Make this damn code work!
|
|
|
|
|
|/| / |Z ! / || [] wrote:
good and exists
A regex may tell you if its syntactically good, but it wont tell you that it exists
|
|
|
|
|
What I meant is that you can evaluate "http://www.thisaddressdoesnotexists.com" and it will work fine.
But with the WebRequest you'll have an URINotFoundException.
See what I'm saying? Regex wont test if it exists on the web, but WebRequest will. That's what I tried to say.
Mariano, el estupefacto.
//TODO: Make this damn code work!
|
|
|
|
|
Does anyone know how to get the client IP (Remote) address that just issued a call to a Web Service.
Thanks
Mike;P
|
|
|
|
|
Context.Request.ServerVariables["REMOTE_ADDR"]
HTH
|
|
|
|
|
Hi, is possible to know with a var if a images from a url as "http:/direc.com/img.gif" exist? how could i know if this image exists ?
thanks
|
|
|
|
|
Set a IMG tag to the source you indicate above. In the image tag I believe you can specifiy onload.
In onload check the WIDTH/HEIGHT properties. If they're not Zero the image exists.
Note: If I remember correctly an IMG won't return HEIGHT/WIDTH properties if the IMG tag is hidden.
I used this approach in a form submission to check the size of an image on the client before uploading, it should work for you too..
Cheers
How do I print my voice mail?
|
|
|
|
|
Hi! In wich language are you coding???
I'll assume you're coding in C#. I'll assume also you want to know if the file exists in a remote Internet address.
<br />
Uri uri = new Uri("http:/direc.com/img.gif");<br />
<br />
try<br />
{<br />
System.Net.WebRequest wr = System.Net.WebRequest.Create(uri);<br />
wr.GetResponse();<br />
}<br />
catch(UriFormatException e)<br />
{<br />
}<br />
Hope is usefull to you!
Mariano, el estupefacto.
//TODO: Make this damn code work!
|
|
|
|
|
I've created a web service which read a web page (an .htm file) using HttpWebRequest, and HttpWebResponse classes. The Internet connection go through a proxy server. The problem I encountered was that it returned cached content rather than update-to-date content. It's the same for the browser. When I type in the URL in the browser, it also return a cached page. However, it can be resolved by pressing the refresh button to requery the web site. The question is, does anyone know how can I programmatically force to refresh the web page in my web service to simulate the same behavior?
|
|
|
|
|
Hi There,
I have an ASP.NET page. I open a child window using the JavaScript function. When the parent closes, the child closes. When the parent refreshes, it loses the variable name of the open child window. So, I can't do anything with it afterwards. I know that you can use a hidden frame to keep track of the variables. Is there any way to maintain functionality without using hidden frames?
Thanks in advance.
Emanuel
|
|
|
|
|
I have a small web application that allows a user to enter a description into a textbox. The description looks something like this:
'The car is blue and costs £5,000. What a bargain.'
When the user presses submit the value entered into the textbox is assigned to a string.
Once the page has reloaded the '£' symbol has disappeared. I have tried it with other currency symbols and they work fine. Please can somebody tell me why the '£' symbol does not assign to the string and if there is a work around.
Thank You
|
|
|
|
|
how do i make a web page expire and send the user back to the login screen i'm useing csharp with asp.net
thanks
chad
|
|
|
|
|
in the web.config set the "timeout" attribute of the sessionstate element. eg.
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="20" />
will expire the session after 20 minutes.
hope this helps.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Hi,
As well as the above solution, if you wanted the page to automatically navigate back to the logon screen (say if someone left the page open for too long), then insert the following meta tags in your HTML pages
<html>
...
<meta http-equiv="Refresh" CONTENT="600; URL=http://my.site/login.aspx">
...
<body>
...
This would navigate back to the login page after 10mins has elapsed.
Hope this helps,
Andy
|
|
|
|
|
Actually I need to do Drill Down Crystal Report.
For Ex 10 Master Records are there.TEST1,TEST2 like that
If I click TEST1,It should display TEST1 detail Record (It is in Another Report)Help met to do.
radha
|
|
|
|
|
Yes, u can link sub reports based on some criteria.
U should use some other discussion forum for product specific questions.
cool man
|
|
|
|
|
hi all i am using dreamweaver to create an asp site and i ve too questions
1- how can i validate a date enterd in a textbox
2- how can i make the password confirmation part whiel a user wants to change his/her password.
these might be a piece of cake but its making mw go crazy
|
|
|
|