|
2. You have to assign a function to the event:
.onsubmit = Function("alert();");
3. onload
4. Inside a string surrounded by qoutes, you use \" for a quoute. Inside a string surrounded by apostrophes, you use \' for an apostrophe. Use \\ for \.
Example:
document.forms[0].elements[5].onclick='document.forms[0].onsubmit=\'alert(\\\'ok\\\');\';void(0);';
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote:
2. You have to assign a function to the event:
.onsubmit = Function("alert();");
3. onload
----------------------------------------
2. still nothing. after this:
javascript:document.forms[0].onsubmit=Function("alert();");
i typed this :
javascript:alert(document.forms[0].onsubmit);
i got this:
function anonymous {
alert();
}
i clicked the submit button and still the same. submits, but no alert box.
3. i used document.body.onunload to make it easier to display after clicking a link. same as above. nothing.
do these work for you?
-- modified at 19:40 Saturday 17th September, 2005
|
|
|
|
|
You can't call alert without a parameter.
alert(1);
---
b { font-weight: normal; }
|
|
|
|
|
dude, you are one cool dude
millon thanks...dude
|
|
|
|
|
I am using ASP to create my web page plz can anyone help,
I want to be able to copy a document with images and paste to a field on my form
Thanks
cleanwater
-- modified at 6:51 Friday 7th October, 2005
|
|
|
|
|
Hi all,
How can I print a .pdf or .doc file from javascript without having to open it?
Thanks
Tony
|
|
|
|
|
|
How do I set the size of a page depending upon a value in the web.config file.
Clueless
|
|
|
|
|
hi there,
do u mean that the size of the client browser?
if so, u can control the size of browser depending on the value in web.config
generally, to set size for web page, u need to do this in java script
below is just an example:
window.open("Sample.htm",null, "height=200,width=400");
Hope this helps
<< >>
|
|
|
|
|
Thanks for that I've tried the following and it opens another window, but I've one more problem that you may be able to help with how do I get rid of the original window.
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="testbrowser.WebForm1" %>
<title>WebForm1
function newWindow(newContent)
{
winContent = window.open(newContent,null,'right=0,top=20,width=350,height=350, scrollbars=yes,resizeable=yes');
}
<asp:label id="Label1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 8px" runat="server">Test
|
|
|
|
|
u mean that u change the size of the first window.
if so, I think no way now.
And hopefully this will be supported in the future
<< >>
|
|
|
|
|
i've an excel template on server
1 - i read values from db (dbCol1=cell, dbCol=value)
2 - i open template on server and i write dataset in the template
3 - save the template with another name and open this file inside a pege container.aspx with an IFRAME and the source of this one is the excel file
IFRAME src="fileExcel.xls"
4 - user changes excel file in iframe
question
the button is in the page that contains IFRAME (container.aspx)
my problem is not write (Excel.Application Excel.Worbook etc etc) or read a file (with OLEDB or ADO)... my problem is saving the modified file in IFRAME or read the opened file
how can i save (or read) the changed file excel with an aspx button???
***********************************************************************
**************************************************************
|
|
|
|
|
I have a page created dynamically in ASP that contains a table of data from a SQL database. If I right click and hit 'Export to Excel' Excel opens a page containing a picture of the unauthorized.asp page. (I'm guessing Excel uses the url to open a copy of the page, but since it is in a different session, the user is not logged in.) I have created a button/javascript that opens a second page that requeries the database and posts the data in a table with content type = "application/ms-excel", so it works.
My question is is there a way to take the data in the original table and export it to Excel without incurring the overhead of running the query again?
Thx
Mark Jackson
|
|
|
|
|
hi there,
this article below might give u an idea on this
http://www.codeproject.com/aspnet/DGExdel.asp
<< >>
|
|
|
|
|
Hey Guys,
I’m working on a project for my diploma thesis:
A (kind of) web-spider browses the news of (let’s say for instance) CNN or MSNBC. The main goals are:
Sending Keywords to look for articles
Finding news: Since CNN stores their news in a database and not in browserable HTML files it’s necessary to send key-words to the CNN search engine. (E.g. tsunami, hurricane).
Receiving a Webpage, which contains links to all articles that deal with this topic. (E.g. click on the link, to see how the page looks like. http://search.cnn.com/pages/search.jsp?query=tsunami)
Using a spider to receive every single article that deal with the topic
Extracting the news article from the web pages (removing web site elements like navigation, adds,...)
Removing HTML tags – the result after this should be a plain text that just contains the news.
Browsing every single article for certain words to determine what kind of news it is (weather, technology,...)
I’m not sure which technologies to use. Personally I’m familiar with C#. I thought about using an intelligent agent framework, but those are all in JAVA or C++. Anyway, I’m pretty sure there must be something useful for .NET, I don’t want to create a web-spider or an HTML-tag-removal from the very first line. My other concern is: How in general should I design this tool?
Thank’s for help
Stefan
|
|
|
|
|
Before you start creating spider, do have a look on the sites you are going to spider and find out, if they support spiders. They might deny access to spiders and might allow you to get those contents by some other means.
See if you can use RSS feed.
- ashish
|
|
|
|
|
Hi,
I sure this is a bit of a newbee question/problem but I am currently trying to build a table dynamically. The table is on an inherited page and I am looping through a dataset building the cells into a tablerow then adding this row to the table. I am using c# and setting the table row to null after each loop but its not getting very far.
I am creating the row like this - where the cells (f1-f6 are setup with height an width and some have buttons and images)
hr.Cells.Add(f1);
hr.Cells.Add(f2);
hr.Cells.Add(f3);
hr.Cells.Add(f4);
hr.Cells.Add(f5);
hr.Cells.Add(f6);
I am getting an error on this line -
forumtable.Rows.Add(hr);
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 201: hr.Cells.Add(f6);
Line 202:
Line 203: forumtable.Rows.Add(hr);
Line 204:
Line 205: hr = null;
Any help would be most appreciated
|
|
|
|
|
Does the id forumtable exist in the page? Have you put runat="server" on the element?
---
b { font-weight: normal; }
|
|
|
|
|
The table forumtable is on a seperate page that the current page inherits and it is set to runat=server, also the form that contains the table is set to runat=server.
If you have any other suggestions I would be most grateful,
Thanks in advance
|
|
|
|
|
I think that you have to declare the variable in the class which has the page that contains the element, e.g. in the class that you inherit.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Can anyone suggest some nice place to learn W3C and interview question on W3C.
Thanks.
|
|
|
|
|
I must admit that I have no idea what you mean
W3C stands for the World Wide Web Consortium...What do you wish to learn about that group, and which interview questions would pop up about W3C?
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|
|
google uncle...
<< >>
|
|
|
|
|
Hi everybody,
I have a piece of code like:
<%
' some code can get the font information
%>
I just wrap some of the asp code with tag.
My question is: how to get the informaiton of the font that wrap the asp code?
It is urgent, please help me!!
Thanks a lot in advance!
alan
Alan Shen
MCAD for .NET Version
^~^~^~^~^~^~^~^~^~^~^
Great idea is the beginging of success!
|
|
|
|
|
You can't. The ASP code is run on the server. There is no graphical interface, so there are no fonts.
If you have html code before and after the asp script tag, you can't do anything with it. On the server, the html code is just treated as text, and there is nothing you can do to access it, unless you open the source file and parse it yourself.
---
b { font-weight: normal; }
|
|
|
|