Все вопросы: [onclick]

111 вопросов

похожие теги:
2
голосов
2ответов
1328 просмотров

maximum length onclick attribute in ie

Does anybody know if there is a length limitation for the onclick attribute in IE7? It seems that my onclick value is cut off after 259 chars. EDIT: Thanks for all your answers. It seems there is not limitation for the onclick attribute. There must be a bug somewhere in my code.

0
голосов
2ответов
957 просмотров

Send an onclick to a dropdown list

Is it possible to show the list of items in a dropdown list when the user presses the up or down arrow keys, when focus is on that dropdown control? I think this would involve sending an onclick to the dropdown list using onkeydown for Keycode 38(arrow up) & 40(arrow down)? But I cannot figu...

0
голосов
1ответов
1242 просмотров

innerHTML flash video not loading problem

when the "preview" link is clicked it is meant to change the video script and video swf using the innerHTML method, however in IE 7+ the flash seems to appear but never loads the video i.e. it just stays white. <script> function changeVideo(filename,script) {document.getElementById('video'...

0
голосов
3ответов
1514 просмотров

Getting ASP.NET ImageButton OnClientClick changes to the server

I use an ASP.NET ImageButton on my website. When a user clicks on the ImageButton, a javascript is fired via the OnClientClick event. The script changes the ImageUrl of the ImageButton. On the same page, I have a submit button. Clicking the button causes a post back to appear. Is there a way ...

0
голосов
2ответов
137 просмотров

How to execute two functions when a URL is clicked

I have the following two event happening when my "export" url is clicked. No matter how I try, I can't combine the two without receiving a "hey, you're missing a comma or semicolon somewhere"-error. Can anybody suggest a way to combine the two, or should I just leave them separate as they are now...

0
голосов
1ответов
305 просмотров

Onclick function that mails page url to admin

I need to create some kind of JS onclick that will run a php mail script that emails a page with broken content. Would it be best to run a normal javascript onclick that calls a php file which is hidden, grabs the referring url and emails it? I would also like a message confirming the click, th...

23
голосов
6ответов
23284 просмотров

ASP.Net double-click problem

having a slight problem with an ASP.net page of mine. If a user were to double click on a "submit" button it will write to the database twice (i.e. carry out the 'onclick' method on the imagebutton twice) How can I make it so that if a user clicks on the imagebutton, just the imagebutton is disa...

70
голосов
15ответов
138673 просмотров

Click toggle with jQuery

I've used a hover function where you do x on mouseover and y and mouseout. I'm trying the same for click but it doesn't seem to work: $('.offer').click(function(){ $(this).find(':checkbox').attr('checked', true ); },function(){ $(this).find(':checkbox').attr('checked', false ); }); I wa...

2
голосов
4ответов
2461 просмотров

Make onclick handler ignore clicks on links

I have a custom onclick handler for a block element (set up through jQuery's .click() method). This block element can contain links. I'm fairly certain this is possible, so, how do I have the handler simply return if it was a link I clicked on (so that the link is visited without running my code)?

7
голосов
1ответов
8400 просмотров

How can I make an ActiveX control written with C# raise events in JavaScript when clicked?

I'm seeing a few questions related to this on SO already, but I think mine is sufficiently different to not be considered a duplicate (if I'm wrong let me know). I have an ActiveX control I've written in C# and while I have it mostly working, I want to raise an event in JavaScript when it's clic...

0
голосов
1ответов
290 просмотров

Arbitrary-arguments JavaScript function from not accessible in onclick event

Ok so this may be a dumb question (probably some syntax) but Google didn't tell me much about why this isn't working, so here goes. I have a function append_..._fields that takes an arbitrary amount of arguments, first one being the id of what to add fields onto, and all following are just names...

35
голосов
8ответов
74693 просмотров

javascript onclick event over flash object

I have one embed flash movie inside one div, I put one javascript onclick event handler in the main div, but isn't catching the click, what is wrong? Code: <div id="top-box-player" onclick="alert('Hi Bananas!');"> <object width="400" height="300"> <param name="mov...

7
голосов
6ответов
16763 просмотров

Prevent javascript onclick on child element

Ok, simple question: <div onclick="javascript:manualToggle(this)"> <span>Allowed to click</span> <span>Not allowed to click</span> <span>Allowed to click</span> </div> Without replicating the manualToggle on to the 2 spans that are al...

1
голосов
4ответов
17513 просмотров

how to insert a url/variable into onclick?

this can't be too complex but it is baffling me - I would like to pass a variable through a url (www.site.com/index.html?var=whatever.htm) and use the variable within an onclick function so that the onclick button uses the variable as the url to go to..onclick. I am trying to do this in place o...

0
голосов
6ответов
16127 просмотров

putting php codes on onclick event of a button

<input type="button" name="continue" id="continue" value="Continue" onclick="<? if($_POST['rules']==null) { echo "hello();"; } elseif($_POST['rules']!=null) { echo "myRedirect();"; } ?&...

2
голосов
4ответов
32611 просмотров

Changing the value of "id=" with document.getElementById

Is this the correct way to do it? <a id="load" href="#" class="btn load" onclick="request(this); $('#load').fadeOut(2000)">add</a> <a href="#" id="test" onClick="alert( 'TEST!' )">here</a> <script language="javascript"> var requests = 2; function request(self) {i...

0
голосов
3ответов
172 просмотров

Basic JavaScript question - event handlers not calling the function?

So I have the following JavaScript code: <script type="text/javascript"> function clearRadioButtons() { document.getElementById("radiobutton1").checked=""; //etc for more radio buttons } </script> And then in my form, I have the following code: <sele...

0
голосов
2ответов
2331 просмотров

Handling multiple submit buttons in a form with JavaScript

I have a form with many fields and 2 submit buttons. I want to run a different check depending on which submit button i click on. I tried writing the code below but it is wrong (i dont know JS) and nothing happens (bad syntax?). How do i figure out which of the two buttons was clicked? document....

7
голосов
6ответов
11035 просмотров

Clickable autocomplete, like google

I'm looking for an autocomplete that have no "submit" button, but that when the user click on the autocomplete keyword he would be redirected to another URL, that i will choose i'm using http://dyve.net/jquery/?autocomplete and i would like to implement in this script, not use any other (because...

0
голосов
4ответов
1218 просмотров

Firebug giving me a syntax error in OnClick function

Here's my HTML: <input type='checkbox' name='PatientReady1' value='Yes' checked onClick="PatientReady ("PatientReady1","111","PatientReady")"> And my javascript: function PatientReady(element, TriageNo, Field){ debugger; if (element.checked == 1){ new Ajax.Request ( ...

2
голосов
3ответов
1525 просмотров

Using jQuery, the onclick event, and Adobe AIR

I'm building an Adobe AIR application with a bit of jQuery to dynamically change the display of the application. Part of the display includes links with Javascript functions on the onclick event except, in the application, onclick is disregarded when the div has been manipulated by jQuery. I've c...

3
голосов
1ответов
5546 просмотров

Jquery - dynamic DIV onclick binding

I have a main page from where I am making a call to "load" and intermediate page's HTML and on the completion of the load I am massaging the returned HTML to add a few DIVs etc, when I try to bind an onclick event for the dynamic Divs (added by me after the HTML returned from the intermediate pag...

1
голосов
3ответов
3086 просмотров

Delphi 2009: Pass component name onclick event then set property

I have a custom component of type TSpeedButton that has two extra properties defined: CommentHeading: string; CommentText: string; I set CommentHeading at design time. When the speed button is pressed a memo is shown with a button beneath it for saving its contents. The procedure that handle...

0
голосов
3ответов
384 просмотров

Change background color of tag cloud

I have following simple code for a word/tag in a tagcloud: <a about="http://localhost/d456c6" href="http://localhost/d456c6" class="tagweight0 Resource">abda</a> i want to change the background on click of a word. the problem is, that i have not only one word with class "tagweight...

1
голосов
6ответов
15090 просмотров

Can I set a value in the onclick function?

I have a link and on clicking the link I want to set the value of a flag variable to 1. Is that possible? Like <a id='ctr' href='#' onclick='flag=1'> Hello </a> And also how to write the function for the onclick event on the same line, like instead of <a id='ctr' href='#' ...

0
голосов
2ответов
344 просмотров

Getting the face of a cube

I want to calculate which face on a cube has been clicked. I've got the mouse to 3D down, and I can draw things, in 3D, at the mouse's position. All I need to do now is calculate WHAT face of a cube is being touched. EG. I have a function, when I pass the size, position and mouse position to it...

3
голосов
4ответов
1415 просмотров

Is there a jquery plugin to show/hide divs based on their class(category) on click

I am working with a grid of small divs which have one of four classes and I would like to be able to fade classes in and out using an onclick event. For example if there are 10 divs and three are categorized as "class1"; upon clicking a link in a menu all BUT the class1 divs fade to completely hi...

0
голосов
2ответов
174 просмотров

Possible to call the function that is set as the onclick function in ASP.NET?

I tried it but I am getting this error: Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler...

11
голосов
4ответов
22863 просмотров

Using JQuery within onClick

Am I allowed to use JQuery within an onClick function? For example: <a onclick="my_save_function($("#inputID").val())"> <input type=hidden id="inputID" value="foo"> Such that, when clicked, the anchor tag runs this: my_save_function(foo); After a few searches, I couldn't find a...

4
голосов
4ответов
9911 просмотров

JQuery UI Rotating Tabs & Events

I'm working with JQuery UI (rotating tabs) and I'd like to know how to stop the cycling when an onclick event occurs on one of the navigation tabs. $(document).ready(function(){ $("#sws_featured > ul").tabs({fx:{opacity: "toggle"}}) .tab...