|
As this is client side code, the runat="server" attribute is totally irrelevant.
This is the way you add the attribute:
this.btnOppenVardVald.Attributes.Add("onclick","return showSelected();");
---
b { font-weight: normal; }
|
|
|
|
|
take a hidden fields to store data and their corresponding id,s
try this
Add this function to attributes of your button as
this.btnSubmit.Attributes.Add("onClick","javascript: return showSelected();");
targetlistId is id of target list
'hiddennames' is input type hidden for names
'hiddenId' is input type hidden for id's
function showSelected()
{
var optionList = document.getElementById("targetlistId").options;
var data = '';
var names = '';
var len = optionList.length;
for(i=0; i<len; i++)
{
if(i="">0)
{
data += ',';
names += ',';
}
data += optionList.item(i).value;
names += optionList.item(i).text;
}
document.getElementById('hiddennames').value=names;
document.getElementById('hiddenId').value=data;
return true;
}
sanjeev
-- modified at 22:53 Tuesday 21st March, 2006
|
|
|
|
|
I created a Site using asp.net1.1
using a http:// as normal
but when I had to connect to LDAP .. i had to use the ALREADY installed SSL
I checked the internet for a solutions but no luke ...,
I checked for the validation of the certification and its valid ..,
it gives me "The server is not operational"
also when i cliked on the IIS : mysite->propereties-> Directory security->Edit button (its enabled ) but when click nothing happened
like they said at this site for example :
http://support.microsoft.com/default.aspx?scid=kb;en-us;299525&product=iis50
so please help , thanks
welcome for any comments , Questions
|
|
|
|
|
Hi,
I have Windows XP Professional edition on my PC.
Initially only Visual studio 6.0 was installed on my PC. It was working fine.
Then I installed Visual Studio .NET 2003. At this time IIS was not installed.
After few days I did uninstallation of Visual Studio .NET. But .NET Framework 1.1 was present even after unistallation of Visual Studio .NET. I left it as it is.
Then I did intsalltion of IIS 5.1
I started working on ASP.
Again I installed Visual Studio .NET. This time IIS was already installed.
Now,
1) When I choose Web application Template in VB.net or C# .net I do get
error stating : "Web server could not launch ASP.NET 1.1"
2) When I am working on pure ASP development, the ASP object model does not figure out Server object's "Transfer" and "Execute" methods.(i.e. Server.Execute and Server.Transfer which are used to redirect a request.). I am using Microsoft Internet Development Environment, which is part of Visual Studio 6.0. is it because the ASP version is old somewhat 2.0? How to check
which ASP version is running?
So what could be the problems, and how should I go about it to fix the same.
Regards,
Amol
|
|
|
|
|
Hi amol,
just go to VS command promt and run aspnet_regiis -i
This will configure ur IIS with .net frame wotk
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshres
http://himabinduvejella.blogspot.com
|
|
|
|
|
Hi HimaBindu,
Thanks, your solution did work.
One more thing I really liked your punch line
"Aim to go where you have never been before & strive to achieve it"...
Excellent!
Regards,
Amol
|
|
|
|
|
10X
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshres
http://himabinduvejella.blogspot.com
|
|
|
|
|
As per ur mail<br />
URL : http:
From: Amol Ravatale <amolravatale@yahoo.co.in><br />
<br />
The solution you provided work out well for my office PC.<br />
The same thing is happening with the PC at my home. So running aspnet_iisreg -i command gives responce as 'aspnet_iisreg' is not recognized as an internal or external command operable program or batch file.<br />
<br />
So how should I go about it?
just go to VS command promt and run aspnet_regiis -i
This will configure ur IIS with .net frame wotk
not aspnet_iisreg
Got it
Happy Coding
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshres
http://himabinduvejella.blogspot.com
|
|
|
|
|
Hello,
How to make a div's position 10px up and 100px right relative to an image on the same page?
I need the div to float over all page content.
Thanks,
Miguel
|
|
|
|
|
Try this
Apply Style to div
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshres
http://himabinduvejella.blogspot.com
|
|
|
|
|
Hi,
Something went wrong on your post because i can't see the style.
Could you, please, post it again?
Thanks,
Miguel
|
|
|
|
|
I just moodified it now u can check
And let me know whether it's working or not
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshres
http://himabinduvejella.blogspot.com
|
|
|
|
|
try this
"tipId" is id of your div
and "fldid" is id of control with respect to which you want to show div
call showtip() and hidetip() where you require
function showTip(tipId,fldid)
{
var coords=getPosition(fldid)
var x=coords.left
var y=coords.top+3
var tipwin=document.getElementById(tipId)
tipwin.style.position="absolute"
tipwin.style.left=x+"px"
tipwin.style.top=y+"px"
tipwin.style.visibility="visible"
tipwin.style.display="block"
var tipcon=document.getElementById('_tipcon')
if(tipcon)
{
if (navigator.appName=="Netscape")
{
tipcon.style.position="absolute"
tipcon.style.left=(x+8)+"px"
tipcon.style.top=(y-9)+"px"
tipcon.style.visibility="visible"
tipcon.style.display="block"
}
else if ((navigator.appName).indexOf("Microsoft")!=-1)
{
tipcon.style.position="absolute"
tipcon.style.left=(x+8)+"px"
tipcon.style.top=(y-13)+"px"
tipcon.style.visibility="visible"
tipcon.style.display="block"
}
}
}
function hideTip(tipId)
{
var tipwin=document.getElementById(tipId)
tipwin.style.visibility="hidden"
tipwin.style.display="none"
var tipcon=document.getElementById('_tipcon')
if(tipcon)
{
tipcon.style.visibility="hidden"
tipcon.style.display="none"
}
}
function getPosition(id)
{
var elem=document.getElementById(id)
var pos={left ,top }
while(elem)
{
if(elem.style.position=='absolute')
break
pos.left+=elem.offsetLeft
pos.top+=elem.offsetTop+3
elem=elem.offsetParent
}
return pos
}
cheers sanjeev
|
|
|
|
|
Hello,
I tried your code but there is still problem due to the fact that I am using a centered design.
I tried to solve this but I don't know how.
When the div becomes visible its position is correct.
However, when I resize my browser window the div stays in same place and doesn't move with the image.
Here is a description of what I am trying to do:
1. I make all div's centered using "text-align: center" in body tag.
2. I use the "wrapper" div so I don't need to worry with centering the other divs.
In this code it would be easy to remove the wrapper div.
However, when the design gets more complex I prefer to use the wrapper.
3. I need to show "Tip" div when "Open" image is pressed.
4. I need to hide "Tip" div when "Close" image is pressed.
"Close" image is inside div "Tip".
5. I need "tip" div position to be relative to "Open" image.
Its position should be 40px right and 60px up from "Open" image position.
6. I neet "tip" div to be over the page contents.
7. The "tip" div should also move when visible and the page is being resized.
Basically, when the page is resized, the "Open" image will move.
So, the "tip" div, if visible, will keep up its position.
Anyway, is this possible?
Thank You Very Much,
Miguel
Here is my page code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin-botton: 10px;
padding: 0px;
text-align: center;
}
#wrapper {
clear: both;
margin: 0px auto;
padding: 0px;
text-align: left;
width: 780px;
}
#header, #content, #footer
{
clear: both;
}
#tip {
width: 200px;
}
.clearer
{
clear: both;
}
-->
</style>
</head>
<body>
<div id="wrapper">
<div id="header">Header</div>
<div id="content">
<p>Content</p>
<div id="tip">
<img id="close" src="Close.jpg" />
<p>Tip Text</p>
</div>
<img id="open" src="Open.jpg" />
</div>
<div id="content">Footer</div>
<div class="clearer">
</div>
</body>
</html>
|
|
|
|
|
Hi,
Are there javascript functions to find the cursor position of a mouse?
Also, are there javascript functions to find if the mouse cursor is within a listbox?
A C# code sample is shown below:
Listbox lb; //lb is a listbox
Point cpos = lb.PointToClient(Cursor.Position); //find coordinates of mouse
if(lb.ClientRectangle.Contains(cpos)) //if mouse cursor is within the listbox
Are there any javascript functions which can do the same as the above c# methods?
|
|
|
|
|
Ok I am trying desprately to give an image abs position depending on its parent's left.
code looks like this:
<div align="center">
<div align="center">
<img src="/images/Logo.gif" id="Logo" />
<span id="Header"><img src="/images/HeaderImg.gif" id="Header" /></span>
</div>
</div>
In my CSS I have something like:
#Logo
{
position:absolute;
top:19px;
left:expression(this.parentNode.style.left + 20 + 'px');
z-index:12;
/*border:solid 2px teal;*/
}
but its not working. I want my image to be 20px away from the DIV that it is in. What am I doing wrong here? can someone please help me with this. THanks in advance.
P.S. I have also tried parentNode.offsetLet + 20 + 'px' but it didnt work either and when I do:
left:expression(alert(this.parentNode.offsetLeft));
I get [0] I dont get it
|
|
|
|
|
It looks like you are trying to do this in the most difficult way possible. Do you really have to use absolute positioning? Why not simply put a margin on the image?
#Logo { margin-left: 20px; }
If the code that you show is all that you have in the body, the left edge of the parent element will however be at the left margin of the page. The div tag will use the full with of the page unless you tell it to do anything else.
---
b { font-weight: normal; }
|
|
|
|
|
Absolutely great, it works perfect you rock!! I spent over 5 hrs trying to find a freaking solution and it was that simple LOL
What I was trying to do was our graphic team designed the grapics for 800x600 but when we were seeing it at 1024x768 every thing was on the left and the client wanted it to be in the middle insted so I added a new div as a container and was trying to get the left of inner div for the positioning which was 0px initially; I didn't know that margin-left would do this for me and i won't have to get the parentNode.style.left property.
Thanks a lot.
|
|
|
|
|
Hi. I need to make a new browser page to open up once I click on a link, however, I do not want that browser page to contain the address bar or anything else[such as the return page, stop, refresh, home, favorites etc buttons to come up, just an empty browser page].
Keep in mind that I only have HTML in my sleeve, no JAVA, or anything else that could help me!!
I lose my job if I can't get this simple job done!!
|
|
|
|
|
Unfortunately, to do what you want to do, you have to use javacript in your HTML document (which is not JAVA). Search for "window.open" (DHTML) on this web site, http://www.google.com or your favorite searching web site.
-- modified at 10:50 Sunday 19th March, 2006
|
|
|
|
|
i have cache problem on the pages... i don't know the reason from me or from the server!
how can i tell the server to cache and not to cache?
i tried this code but nothing happend:
< ? header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 ? >
or
Militiaware
Faris Madi
-- modified at 10:35 Sunday 19th March, 2006
|
|
|
|
|
Hi...
I am trying to create crystal reports in ASP.Net.
When I run the report, I am getting huge white space on the left side of the web page.When I move viewer control's position to extreme left side of .aspx page I am able to avoid white space appearing on the web page.But I need to know is there any specific way to solve this problem? Can anyone tell me how can I change the back color of the chart?
Thanking u,
Sujatha
-- modified at 1:26 Saturday 18th March, 2006
|
|
|
|
|
Hi
I have a website (asp and SQL Server). It works fine before. but recent days, It will slow down (some time is fast and some time very slow) if I update some pages even the pages just have some static words changed!
I have no idea what cause this!!
Does anybody have some ideas?????
Thanks a lot!!
Alan Shen
MCAD for .NET Version
^~^~^~^~^~^~^~^~^~^~^
Great idea is the beginging of success!
|
|
|
|
|
First, I would check your disk space. Sql Server files or IIS files may have grown very large. Also, check for viruses!
|
|
|
|
|
Did any one implemented ajax in web application?
sanjeev
|
|
|
|