|
On a page we've got an HTML select defined as follows:
"Half this game is ninety percent mental." - Yogi Berra
If you can read thank a teacher, if you can read in English, thank a Marine.
|
|
|
|
|
I'm interested to see your code... I tried doing a quick implementation to see what happens, and while i can manage to lock the scrolling in FF, it doesn't seem to be possible in IE6...
function moveUp()
{
var list = document.getElementById("theList");
var sel = list.selectedIndex;
if ( sel > 0 )
{
repositionOption(list, sel, sel-1);
}
}
function moveDown()
{
var list = document.getElementById("theList");
var sel = list.selectedIndex;
if ( sel < list.length-1 )
{
repositionOption(list, sel, sel+1);
}
}
function repositionOption(list, sel, index)
{
var scroll = list.scrollTop;
var opt = list.item(sel);
list.remove(sel);
opt.selected = false;
try
{
list.add(opt, list.item(index));
}
catch(e)
{
list.add(opt, index);
}
list.scrollTop = scroll;
opt.selected = true;
}
every night, i kneel at the foot of my bed and thank the Great Overseeing Politicians for protecting my freedoms by reducing their number, as if they were deer in a state park. -- C hris L osinger, Online Poker Players?
|
|
|
|
|
Ah thanks, didn't know about scrollTop. It still doesn't quite pull off the default IE 7 behaviour which continues to scroll to keep the selected index in view, but works well enough. Here is what we use:
function orderSelect($down,$oName,$fName,$EXCLUDE) {
if(typeof($oName)!="object"){var $obj = document[$fName][$oName];} else {$obj = $oName;}
$sl = $obj.selectedIndex;
var scroll = $obj.scrollTop;
if($obj.options[$sl].text==$EXCLUDE || $obj.options[$sl].value==$EXCLUDE){alert("This item cannot be altered.");return false}
if ($sl != -1 && $obj.options[$sl].value > "") {
$oText = $obj.options[$sl].text;
$oValue = $obj.options[$sl].value;
if ($obj.options[$sl].value > "" && $sl > 0 && $down == 0) {
if($obj.options[$sl-1].text==$EXCLUDE){alert("This item cannot be moved into that position.");return false}
$obj.options[$sl].text = $obj.options[$sl-1].text;
$obj.options[$sl].value = $obj.options[$sl-1].value;
$obj.options[$sl-1].text = $oText;
$obj.options[$sl-1].value = $oValue;
$obj.selectedIndex--;
$obj.scrollTop = scroll;
} else if ($sl < $obj.length-1 && $obj.options[$sl+1].value > "" && $down == 1) {
if($obj.options[$sl+1].text==$EXCLUDE){alert("This item cannot be moved into that position.");return false}
$obj.options[$sl].text = $obj.options[$sl+1].text;
$obj.options[$sl].value = $obj.options[$sl+1].value;
$obj.options[$sl+1].text = $oText;
$obj.options[$sl+1].value = $oValue;
$obj.selectedIndex++;
$obj.scrollTop = scroll;
}
return true;
} else {
alert("Please select an item first.");
return false;
}
}
orderSelect is called in the onclick event for an image input. Thanks for the help!
|
|
|
|
|
Ah, well that's a bit different. Try restoring the scroll position before modifying the selected index - that ought to let FF keep the selection in view. If not, then try also changing <span>$obj.selectedIndex++</span> to <span>$obj.options[$sl+1].selected = true</span> .
every night, i kneel at the foot of my bed and thank the Great Overseeing Politicians for protecting my freedoms by reducing their number, as if they were deer in a state park. -- C hris L osinger, Online Poker Players?
|
|
|
|
|
Hello dear friend
I want to create popup menu in javascript like www.alexa.com ..
when alexa site open it give small popup menu so i want to create this type of menu..
can anybody give me info about that
thanking you
|
|
|
|
|
Dudhat wrote: can anybody give me info about that
No.
There are... thousands of different designs and implementations for such things. Without knowing what your requirements and constraints are, it's pretty much pointless to try and pick one for you. Personally, i don't care much for 'em. It's a web page, not a desktop app - you have enough menus already.
So,
Try doing a search here on CP. Then do a search on Google. Then check out this site[^]. Then sit and think about all that for a good while. Maybe talk to other people involved in whatever it is you're making, see what they think.
Then, when you have a specific question, come on back...
every night, i kneel at the foot of my bed and thank the Great Overseeing Politicians for protecting my freedoms by reducing their number, as if they were deer in a state park. -- C hris L osinger, Online Poker Players?
|
|
|
|
|
|
Hello my friend
could you please help me for solving problem in opera
i have one webpage it propery open in firefox browser but in opera it does not display proper.
thanking you
ashok
Ashok
|
|
|
|
|
Is it a mind-reading site, by any chance?
|
|
|
|
|
Hi,
i am developing a website using classic asp in internet explorer.
Its login page is workig fine ,when i copy the address from the address bar of a protected page,it redirect me to the login page.
but am doing the same copy and past thing with firefox,it is not redirecting me to the login page,instead to the protected page. wat can i do?
this is part of the code in the protected page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"><br />
<html><br />
<head><br />
<title></title><br />
<% <br />
If Session("blnValidMember") <> True Then <br />
Response.Redirect("login.asp") <br />
End If <br />
%> <br />
<%<br />
Response.Expires = -1000<br />
Response.Expiresabsolute = Now() - 1 <br />
Response.AddHeader "pragma","no-cache" <br />
Response.AddHeader "cache-control","private" <br />
Response.CacheControl = "no-cache" <br />
%><br />
<br />
</html>
this is part of the code in the validating page
<%<br />
'Declare variables<br />
Dim oConnection, oRecordset, sSQL,sql2,rs,dr,strSQL<br />
Dim UserName, sPassword<br />
<br />
'Receive the form values and assign to sUserName and sPassword variables<br />
Username = Request.Form("txtUsername")<br />
sPassword = Request.Form("txtPwd")<br />
<br />
'If Username=sAdminUsername AND sPassword=sAdminpassword Then<br />
'Session("blnValidMember") = True<br />
'Session("Admin")=True<br />
'response.redirect "admin/approve.asp"<br />
'Else<br />
'Create a connection odject and a recordset object<br />
Set oConnection = Server.CreateObject("ADODB.Connection")<br />
Set oRecordset = Server.CreateObject("ADODB.Recordset")<br />
set rs= Server.CreateObject("ADODB.Recordset") <br />
<br />
oConnection.Open sConnString<br />
<br />
sSQL = "SELECT username, password FROM clientlist WHERE username ='"& UserName & "'"& _<br />
" AND password ='" & sPassword & "'" <br />
oRecordset.Open sSQL, oConnection<br />
If NOT oRecordset.EOF Then<br />
'If its a valid login then set the session variable to True<br />
Session("blnValidMember") = True<br />
<br />
Else<br />
<br />
Session("blnValidMember") = False<br />
Response.Redirect "errorpage.asp"<br />
End If<br />
<br />
%><br />
thank you in advance
|
|
|
|
|
Looking at that code, it looks as though you must have had a active session in FF. Maybe you had already logged in and forgot about it. Clear everything out in FF and try again.
|
|
|
|
|
|
FF in this case is short for Firefox.
However, the suggested abbrevation by the Firefox staff themselves is Fx .
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
Can anybody tell me how i send html base newsletter to my customer? Can anybody tell any good software (Which embed images in email). Now I have a problem, when i send newsletter to my customer in yahoo its display three times and sometime it layout disordered. any solution.
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
Just have a look in to this.
http://www.codeproject.com/useritems/Send_Inline_Image_Email.asp
Laddie
|
|
|
|
|
I'm getting two errors each and every time I use session_start():
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/www/technomatrix.net/private/swcblog/Sep2007.php:8) in /home/www/technomatrix.net/private/swcblog/login.php on line 27
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/www/technomatrix.net/private/swcblog/Sep2007.php:8) in /home/www/technomatrix.net/private/swcblog/login.php on line 27
I've tried searching on Google for solutions to this problem, most of the results I've gotten say to make sure that there is no whitespace before the session_start() . That's doesn't seem to be the problem here. I've used ob_start() and ob_end_clean() to not let the warnings show, but that STILL doesn't set the session!
Anyone out there that can help me?
(I think it has something to do with awardspace (my hosting) setting a session_start() before I do...)
Thanks in advance!
|
|
|
|
|
You can have multiple calls to session_start without problem, and it would be very unlikely your host would run some PHP code before your script.
The message is simply because something is being output before the call to session_start. The line numbers should point you in the direction of what is outputting data.
|
|
|
|
|
Hello,
I have a simple sample that demonstrates how to connect web parts with incompatible interfaces using WebPartTransformer derived class and it works as expected in ASP.NET scenario, but when I deploy the same web parts to SharePoint server, the text in connection options is correct, but the options are disabled (grayed).
Does anybody have any idea what's going on and how to make it work?
Thanks in advance.
Goran
|
|
|
|
|
I have a master page with 2 divs a LeftColumn and MainColumn. My menu control is in the LeftColumn, the static menu is the same size as the left column so my dynamic menu pops out over the main column. My problem is when the dynamic menu pops out it is behind the content in my MainColumn. How can I get this to come out in front? I know the answer is right in front of me but I seem to be missing it. Any help would be most appreciated.
|
|
|
|
|
hello,
Can you please tell me, is there any free control for Fileuploading in Asp.net Ajax with a Progressbar.
Note : progressbar shoulb be simulated with data transfered; max file upload size required is 100mb, even if i try to upload in FTP it should accept 100mb.
Regards,
Ramya
ramya
|
|
|
|
|
hi,
i need an open source for the blogs which i need to integrate into my application.
I'm working on c#.net2.0 as frontend and sqlserver2005 as backend.
I want the blogs like the myspace website has. the link for the same is given below:
http://www.myspace.com/
I should be able to set blog as private, so that only user's friends can send comments.
Do not show e-mail addresses but create a secure link so that members can message without showing thier e-mails unless they request it.
Make profiles publically visible, and that the page will not show the function buttons when publically viewed.
And some more things like this.
So i need an open source code for this.
Can somebody pls. help me.
Its urgent.......................
Thanks,
Harry
|
|
|
|
|
harryforum wrote: Its urgent.......................
Of *course* it is.
Try here[^].
I also thought MS had something.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I created this website for my dad www.prof-abbasi.com sometime back. It shows up perfectly fine in IE7. Recently, I downloaded FireFox and opened the website using it. The tabs get expanded like as if the "height" has been set to 100% although they have been set to "50".
I don't understand why this is happening. I checked the codes... all seems fine.
Please can you take a look and tell me which part is wrong?
Thanks.
Tara
Fortitudine Vincimus!
|
|
|
|
|
Basically, IE and Firefox render things differently, you need to test with both, and you need to be proactively writing code that both can render as you wish. There's lots of websites listing the things that they render differently, and workarounds.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you. I did a Google on the problem and found that setting the table layout to "fixed" solves the problem.
Fortitudine Vincimus!
|
|
|
|