|
Try setting the root directories to the same directory, that way both sites contain the same information. This help? if not then I'll provide more assistance
|
|
|
|
|
Yes, it's possible...I did this just the other day...
Under linux, you need to edit your HOSTS file and point sub.domain.com to localhost or whatever IP or address you have assigned.
Then I modified httpd.conf and added two seperate <virtualhosts>
The first one is the primary (www.domain.com) and is used whenever no other subdomain is provided...
The second or more are the sub-domain entries
Each of the <virtualhosts> allow you to map sub-domains to any directory you wish...
No mod_rewrite required :P
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
Hi All
If you design a web page for viewing only with a mobile browser (say the most stone-age version
around), what is the best image format to use and what is the maximum pixel size that could be used for the image eg 110x100?
Any thoughts would be welcomed.
Regards
Jeremy
|
|
|
|
|
Hi
I am using IE Web control Tree View node.can you please help me in how to expand the tree view nodes at run time by javascript code.
please help me in this.
-- modified at 2:25 Saturday 4th November, 2006
te
|
|
|
|
|
How to create pagging in asp.net, asp and php . I have 100 no of data and iI want to display 20 no of data.
Bharat Bhusanam
|
|
|
|
|
I assume you mean like a certain amount of results per page.
This is a simple task. I'll give a simple PHP example.
<br />
$first_res = $_REQUEST['first'];<br />
$last_res = $_REQUEST['last'];<br />
<br />
if($first_res == null or $last_res == null){<br />
$first_res = '0';<br />
$last_res = '20';<br />
}<br />
<br />
$isvalid = validation_function_here($first_res, $last_res);<br />
<br />
if ($isvalid !== true){<br />
die('Invalid Format, Please Press back button and choose a different option');<br />
}else{<br />
<br />
<br />
$con = mysql_connect('localhost', 'root', 'password') or die('Could not connect to database.');<br />
mysql_select_db('data') or die('Could not select database');<br />
<br />
$result = mysql_query('SELECT * FROM table LIMIT '. $first_res .', '. $last_res .';');<br />
}<br />
<br />
<br />
<br />
and that's that.
Note:
You then need to set functions that get the result number etc. and return then next set to be displayed based on the difference between the two, and echo that into the href of a link on the page. and exampl of this link would be:
[a href="?first=21&last=41"]Next[/a]
Hope that helped.
|
|
|
|
|
How to remember userid and password for this site when we checed the checkbox?
what is code and logic behiend this. plz use vb.net
Bharat Bhusanam
|
|
|
|
|
Basically it'll be something like:
<br />
if($_REQUEST['checkbox'] == 'checked'){<br />
<br />
setcookie ("userid", $randomly_generated_userid_for_current_login_session, time( ) + 3600);
<br />
<br />
}else{<br />
<br />
<br />
setcookie ("userid", $randomly_generated_userid_for_current_login_session, time( ) - 1); <br />
<br />
}
|
|
|
|
|
The cookie does not expire on browser close!
Bradml wrote: setcookie ("userid", $randomly_generated_userid_for_current_login_session, time( ) + 3600); //I am have actually seen this variable in the wild!
That's crazy!
|
|
|
|
|
UltraCoder wrote: The cookie does not expire on browser close!
yes i think you will find that if you provide a negative time to the present then when the browser closes it will remove the cookie.
|
|
|
|
|
How to send message one pc to another pc ttrough bluetooth devices(bluetooth devices are attached to both pcs and they are in range). I want to use any type of application (windows/web) written in vb.net.
Bharat
|
|
|
|
|
I don't think you really want web dev here.... or VB
|
|
|
|
|
the program should be written in vb.net
Bharat Bhusanam
|
|
|
|
|
Guys and Gals,
Have a situation where I need to represent some data as a collection of div elements surrounding a central div. There could be anywhere between 0 and infinite "object" divs, but only one central "subject" div.
I've tried various methods of laying out the divs - for instance, I tried to lay them out in a circle around the central point, but this just looked a bit naff, so we've settled on a square layout.
I've tried various algorithms, but everything I've come up with has either been really messy, inelegant processing, or just flat out doesn't work..
Anyone have any ideas for a way of going about this?
For example - my first thought ran something like....
get number that will fit horizontally
get number that will fit vertically
for each element work out which "slot" it fits into (either horiz or vert)
position the div in the middle of this "slot"
which seems fine on paper, but am running ito all sorts of problems, such as (and most embarrassingly) deciding which side a div shold be "connected" to (top / bottom / left / right)
Anyone?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi Richard,
You take any layout plan but every plan looks neat and tidy if there is some restriction on it. for e.g. If you take square plan you are restricted to four nodes only same way if you take octagon plan here you are restricted to well placed 8 nodes.
My suggestion is
1. Restrict your number of nodes you want to display (to well calculated tidy view).
2. Go for a tree view placing central object at top and then keep on attaching elements down the line.
cheers,
Akhilesh Yadav
|
|
|
|
|
Many thanks for the reply...
I think you make a good point - there are of course going to be restrictions, but in this instance, going for a treeview is a non starter - the area I'm working on is a visual designer, which allows the user to drag & drop various "contacts" around a page, with lines showing the connections between them (it's part of a CRM-y kind of system).
Having tried various ways of laying these divs out initially, the most aesthetically pleasing (we think) would be to have the "subject" in the centre with the contacts arranged in a square around the outside. By square - I don't just mean one at each corner - what I'm trying to achieve is for the code to be able to determine how many will fit along each side, then lay them out at regular intervals..
So for example, if there were 10 contacts that needed to be displayed, and we can fit (say) 3 horizontally and 2 vertically, then we want to end up with the subject in the middle of the page, with 3 along the top edge (ideally with the 2nd positioned directly above the subject) one on each of the left and right side and 3 along the bottom, with the remainder going in another "loop" around, but offset slightly from the first set..
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
hello dear,
i m using mehtod window.open('webform1.aspx') in our code. but on my client side we have intalled pop-up blocker. so when i execute this code then webform1.aspx page will open but pop-up blocker close this new window. so plz help me and tell me how i can open this window by using javascipt code without uninstall pop-up blocker. plz help me it is very urgent......
waiting for ur reply..
jagmit
|
|
|
|
|
Strangely it's not possible for javascript to disable a popup blocker. Can't imagine why this wasn't included in the javascript spec...
|
|
|
|
|
Paddy Boyd wrote: Can't imagine why this wasn't included in the javascript spec...
I'm on it... filling out bug report as we speak.;P
|
|
|
|
|
Can't you fill out reports for the "unable to set value of input type=file" and "unable to access page from other domain" bugs when you're at it?
---
b { font-weight: normal; }
|
|
|
|
|
Presently I'm working in classic ASP. I'm using AJAX for one reason that I do not want to reload the page and for second reason I want better performance.
I'm having two dropdowns (combobox) and two textboxes.
I want to have the second dropdown populated as per the selection of the first dropdown. That is all fine. I've already implemented that. Now, next I want that the two textboxes contains the records as per the selection of the second dropdown.
The first dropdown contains the States, the second dropdown should be populated with the City as per the selection of the States and first textbox should contain with the code of the selected City (the codes of the cities are already there in the database) and the second textbox should contain the latitude and longitude of the selected City (the latitude and the longitude of the Cities are also there in the database).
Can anyone please help me?
It will be very much helpful if you can provide me with a code.
My delivery date is approaching near and I'm in urgent need.
Thanks in advance for your help.
|
|
|
|
|
What's the question?
popin wrote: The first dropdown contains the States, the second dropdown should be populated with the City as per the selection of the States and first textbox should contain with the code of the selected City (the codes of the cities are already there in the database) and the second textbox should contain the latitude and longitude of the selected City (the latitude and the longitude of the Cities are also there in the database).
If the "Codes of the Cities" and the "Latitude and Longitude" are all in the database, what do you need help with?
Please be more specific.
|
|
|
|
|
Thanks for replying...
Basically the second dropdown gets populated as per the selection of the first dropdown. Now when I select the the second dropdown (i.e. the city) then the two textboxes would be filled up with code of the city and the atitude and longitude of the selected City. The second dropdown is getting populated properly but when I'm selecting the city from the second dropdown, either nothing happens or another combobox is geting created. I'm at a loss as to how to code on the 'onChange' event of the second dropdown. I've tried some ways but none seems to work.
Please help urgently.
Thanks once again for the response.
|
|
|
|
|
Use XMLData island for filling text boxes
cheers,
Akhilesh Yadav
|
|
|
|
|
Hello,
I need help with a simple problem:
if I read a text from a file (PHP) $text=fgets(...) variable, say we it's having about 3000 characters, how can I trunate it to a fixed length so I'll get a shortcut
something like char *text="aaaaaaaaaaaaaaaaaaaaaa"; text[10]='\0'; in C++
thanx a lot
|
|
|
|