|
<a href="JavaScript:self.print()">Print</a>
okay this is a link, transform it yourself to a button or place an image in the tag.
|
|
|
|
|
Hi.
How can I close right click on flash files, In code or in fla file itself ?
I have used flash player component.
Best wishes
|
|
|
|
|
Hi,
How can i print a praticular div region using javascript on the claick of a button.
Will it show a print dialog or will it directly print.
Thanks in advance.
Deepak Surana
|
|
|
|
|
It will always show a print dialog, i don't think it's possible to print directly to a printer. And I guess you best place the div block in a new window (pop up dialog or something) and print that page.
|
|
|
|
|
Ok thats a fair suggestion. thanks.
Can you plz tell me how to print a perticular div region when i click on the button.
|
|
|
|
|
Hi,
There is a problem with the javascript below. I cant find where the problem is.
I have to draw a rectangle by dragging the mouse. Also, when the mouse is first clicked before dragging and released after dragging, the mouse coordinates will be displayed.
I had 2 seperate scripts. One which draws the rectangle when the mouse is dragged and the other displays mouse coordinates when the mouse is clicked and released. Both can work individually but when I combine them, there is a problem. The rectangle can be drawn but the mouse coordinates are not displayed.
<script type="text/JavaScript">
var d;var posx;var posy;var initx=false;var inity=false;var click = 0;
function getMouse(obj,e){
posx=0;posy=0;
var ev=(!e)?window.event:e;//Moz:IE
if (ev.pageX){//Moz
posx=ev.pageX+window.pageXOffset;
posy=ev.pageY+window.pageYOffset;
}
else if(ev.clientX){//IE
posx=ev.clientX+document.body.scrollLeft;
posy=ev.clientY+document.body.scrollTop;
}
else{return false}//old browsers
var target = (e && e.target) || (event && event.srcElement);
if(target.id=='Canvas'){
obj.onmousedown=function(){
initx=posx; inity=posy;
d = document.createElement('div');
d.className='square'
d.style.left=initx+'px';d.style.top=inity+'px';
document.getElementsByTagName('body')[0].appendChild(d)
if(click == 0){
click = 1;
document.getElementByID('xbefore').value=posx;
document.getElementByID('ybefore').value=posy;
}
}
obj.onmouseup=function(){
if(click == 1){
click = 0;
document.getElementByID('xafter').value=posx;
document.getElementByID('yafter').value=posy;
}
initx=false;inity=false;
}
if(initx){
d.style.width=Math.abs(posx-initx)+'px';d.style.height=Math.abs(posy-inity)+'px';
d.style.left=posx-initx<0?posx+'px':initx+'px';
d.style.top=posy-inity<0?posy+'px':inity+'px';
}
}
else{return false}
}
document.onmousemove=function(event){
getMouse(document,event);
}
Before
X:
Y:
After:
X:
Y:
Could anyone help to see where the problem is?
I can post the 2 individual working scripts if needed
-- modified at 22:47 Sunday 21st May, 2006
|
|
|
|
|
Hi Friends,
As we got SiteMapPath control in ASP.NET.
Does any one know how to perform this functionality in classical ASP?
any code or link will be appriciated.
Naveed Kamboh
-- modified at 9:37 Monday 22nd May, 2006
|
|
|
|
|
Not really sure what you want, but perhaps the Request.Servervariables collection..? Maybe the following page will help:
cheers
P
<%@ LANGUAGE=VBSCRIPT %>
<HTML>
<HEAD>
<TITLE>Server Variables</TITLE>
</HEAD>
<BODY bgcolor="white">
<table border=4 width=700>
<tr>
<td width=100 bgcolor="black"><font color="white">
<b>Server Variable</b></font></td>
<td bgcolor="black"><font color="white">
<b>Value of Server Variable</b></font></td>
</tr>
<%
Dim LoopCount
LoopCount = 0
For Each ServerVariable In Request.ServerVariables
LoopCount = LoopCount + 1
If LoopCount Mod 2 = 0 Then
%>
<tr><td bgcolor="ffddbb">
<%= ServerVariable %>
</td>
<td bgcolor="ffddbb">
<%= Request.ServerVariables(ServerVariable) %>
</td></tr>
<% Else %>
<tr><td bgcolor="e3ffb0">
<%= ServerVariable %>
</td>
<td bgcolor="e3ffb0">
<%= Request.ServerVariables(ServerVariable) %>
</td></tr>
<%
End If
Next
%>
</table>
</BODY>
</HTML>
|
|
|
|
|
Hi Phil,
I want to show path on web site this.
Home> category1 > product5
It means user clicked on category1 and product5 of cateogry1.
Now if user will click on home or category1 he can go to respective pages.
any idea sir with classical asp.?
Naveed Kamboh
|
|
|
|
|
I'm writing a webservice to look up the information of Person stored in file Data.xml. This xml file is stored in App_data folder. The following source code to read xml file:
XmlDocument doc = new XmlDocument();
Boolean b = true;
try
{
doc.Load("..\\App_Data\\Data.xml");
XmlElement xmlRoot = doc.DocumentElement;
string xpath = "/dataroot/Data";
XmlNodeList node = xmlRoot.SelectNodes(xpath);
int len = node.Count;
for(int i=0; i
|
|
|
|
|
I've downloaded and installed the Visual Web Developer 2005 Express Edition IDE on my desktop. I wanted to take a look at some old backups which I know work in order to ensure my web server (I believe I have to use Cassini which installs with the IDE as I have XP home edition on my desktop) and SQL Server are configured correctly. As I know the asp pages read the SQL database on my laptop I know the code is correct and I must look at configuration.
I have yet to locate my ASP.NET backups (we've just emigrated), but as I need both I thought I may as well start with the ASP pages. However, when I attempt to view them in IE I get the message:
This type of page is not served. <br />
Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.asp' may be incorrect. Please review the URL below and make sure that it is spelled correctly
A solution I've found on MSDN says:
"You need to enable ASP support on your server -- this can be done through the IIS Manager, and Web Site Extensions node."
I have never used Cassini before. In fact, in the XP Home control panel I can't even find Cassini, let alone enable ASP support. Has anyone had any experience with Cassini?
Before anyone tells me to go and get decent software perhaps I should explain why I'm forced to work with these tools. Firstly, I have XP Pro and VS 2003 on my laptop. However, as they were loaded on by my last employer I can not use them for the subcontracting projects I'm being offered to do from home. I've been on maternity leave for 1 year since the birth of my son and do not plan to purchase expensive development tools (or even XP Pro) until I see that the people I'll be subcontracting for are genuine and that I am in fact going to be paid rather than scammed. Should the first few projects go well and things continue to look kosher I'll naturally re-evaluate the tools I'm using to build their sites. In the meantime though I need to get this XP Home desktop working in order to build those first sites which I believe with be ASP.NET, some ASP 3.0 and SQL Server sites.
Thanks for any help!
A mum and loving it!
|
|
|
|
|
It is possible the error is due to Cassini WebServer not finding relevant files.
Taken from the Cassini ReadMe file,
Run the web server using 'CassiniWebServer <physical-path> <port> <virtual-path>'.
For example:
CassiniWebServer c:\ 80 /
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Thanks Richard,
Unfortunately I'm running the project from VS. aspx files are running great, asp not so great. I'm really starting to pray that these projects I'm going to be given are all going to end up hosted on a .NET server
A mum and loving it!
|
|
|
|
|
Hi Megan,
Running XP Home does create problems as you cannot use IIS as would be installed by XP Pro.
It appears you have to either install XP Pro or use a competitor product such as Apache, which I think will run on XP Home. And that Apache is FREE as in OpenSource.
Visit the following and look for HTTP WebServer (latest version 2.2)
http://apache.org/[^]
As long as you configure the installed Apache properly, it should be able to process the old asp pages. Although I have never used it with aspx.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
hi all,
i have this crazy idea and now its got me stuck. Lets start from the beginning. i have a simple web page mixed with some javascript, but i need some data, lets say from a database of file. To solve this a created a .net web service that will, for arguments sake return "hello world!". Now how do i get it into my web page. The reason i've done it this way is because i can host the asp.net myself but provide only a few hours of coverage, but the web page will be hosted on linux system and will be on all the time.
for example this goes straight to the service, but how do i change it to bring data back and display it
<html>
<body>
<form action="http://localhost/WebService1/Service1.asmx/gethelloworld" method="POST">
<input type="submit" value="Enter"> </input>
</form>
</body>
</html>
this is a sample of the main web page:
<HTML>
<FORM>
<INPUT TYPE="" NAME="name" SIZE=50 MAXLENGTH=40 tabindex="1" id="name">
</form>
<script>
name="How do i get webservice data in here"
document.forms[0].name.value=name
</script>
</HTML>
there is however another way, if i could somehow activate the web service rather than going directly to it, then i could make the service create an xml file and read the data that way!, any suggestions on this would be greatly appreciated.
thanks
|
|
|
|
|
|
i have the following list defined:
<select onChange="alert('An Item is selected');">
<option selected >(NONE)</option>
<optgroup Label="Group1">
<option >Item1</option>
<option >Item2</option>
<option >Item3</option>
</optgroup>
<optgroup Label="Group2">
<option>Item4</option>
<option>Item5</option>
<option>Item6</option>
</optgroup>
</select>
When a user attempts to make a selection using the mouse scroll , the item right after the optgroup is not caught by the onchange event.How can i solve this problem?
|
|
|
|
|
hi all
so is there a control that will allow you to either
select from a dropdownlist but also let you type in
a NEW item on top? What control is that? Ive seen these on
websites.
I need my users to be able to select from the drop down, but
if the item of their choice doesnt exist, they can just type
it and hit "add" and it'll add to the wish list.
Or do I need to add a separate textbox and imitate this behavior?
thanks
Moazzam
|
|
|
|
|
|
|
I am developing asp.net1.1 application
I have hug number of records in DB( SQLServer ) & want to show in a datagrid
There are thousands of records which need to transfer to client & client can sort & search
What is the best way to handle such type of situation
I am also using Ajax , when I use Ajax to call a function it lock the page until the all data is transfer to client , that’s not good
Did I use xml file to send on client & from xml file show data to client
or if there is any good solution plz....
I will be really thankful
Irfan
|
|
|
|
|
I have some serious css problems with IE
I have some styles nested like:
Box1.Blue
{
...
}
.Box1.Blue .Caption
{
..some completely different background image for blue box1 caption..
}
.Box2.Blue
{
...
}
.Box2.Blue .Caption
{
..background image for blue box2 caption..
}
and the html looks like:
<div class="Box1 Blue">
<div class="Caption">abc</div>
some content
</div>
and the same html for box2 style
this works all fine in FF, opera, NS but not in IE
in IE both the ".Caption" styles get the _same_ background image.
other attribs works though , eg if the captions has different bg colors.
but image seems shared for every element with the same name.. no matter what parent style it belongs to.
so is this a known bug and is there some workaround for it?
or do i have to make funny names like "Box1BlueCaption" ?
-- modified at 7:33 Friday 19th May, 2006
|
|
|
|
|
On the webpage you are viewing this, why not save the document (complete) to you hard drive. Navigate to where you have saved it and locate the global.css file and look at how it is constructed. You will note that there are no duplicate entries. Also remember that styles are inheritable.
Consequently, when you design css style sheets for your own use then do not try to confuse Internet Explorer.
In other words, dont name
Roger J wrote: .Box1.Blue .Caption
and
Roger J wrote: .Box2.Blue .Caption
as this may cause the confusion.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Good day to all.
Here is some html I've been trying to access using JavaScript
<div class="batchUpload" id="hideableDiv" style="display:none">
<form name="batchUpload">
<table>
<tr>
<td>Files to be uploaded.</td>
<td><input type="file" name="uploadFiles" maxlength="10"></td>
</tr>
<tr>
<td><input type="reset" title="Reset"><input type="submit" title="Submit"></td>
</tr>
</table>
</form>
</div>
Can anyone tell me how I can access the following div in JavaScript? I want to change its style.I've tried the following, but it doesn't work:
.......
try
{
this.document.div.addMemberDiv.hideableDiv.style.display="table";
}
.........
-- modified at 15:41 Thursday 18th May, 2006
|
|
|
|
|
Use the getElementById method to locate elements in the document. The value 'table' is not valid for the display style.
document.getElementById('hideableDiv').style.dislay = 'block';
---
b { font-weight: normal; }
|
|
|
|