Hi,
How to detect whether a DOM element is block or inline with javascript?
For example, is there a function/property which returns 'inline' for a 'a' tag?
Thank you.
element is upcoming cross browser standart for playing videos, while most videos out there right now are in flash format.
I am new to tag, so if it is possible a code sample of how to play flash movie with tag would be nice
I am in the process of learning JQuery thanks mostly to the positive reference here on Stack Overflow. I need a function that checks all the checkboxes in an element which have the same CSS class. It should returns true if at least one of them is checked. There are also other boxes in the element that are irrelevant to the check.
The CSS class is unnecessary and only in place to create a way to identify the checkboxes in the group. It feels like bad practice, so any recommendations about other ways to identify them are welcome.
I'm writing a small firefox addon to grab urls and send them to a site. What I want to do is be able to right click on a link (but not have to actually highlight it) and be able to click send and the links href value is grabbed and sent. The bit I'm having trouble with is detecting if the selected element is an anchor and grabbing it's href. Many thanks for any help given :)
Hi,
I'm getting this error when trying to restore an SSAS database from a backup:
The ddl2:MemberKeysUnique element at line 63, column 4862 (namespace http://schemas.microsoft.com/analysisservices/2003/engine/2) cannot appear under Load/ObjectDefinition/Dimension/Hierarchies/Hierarchy.
Google hasn't turned up any helpful solutions. (a lot of people found that installing SP2 made the error go away but this has always previously worked in our environment)
I don't really understand what the error means. Can somebody interpret or suggest a fix?
Thanks,
Phil
hello
I'm new to PHP and I recently started learning Zend Framework. What DAL are you using? Do you think that Zend_Db_* can do the magic? I need it mainly for MySql db. Does it have any limitations and can I use it in big project without any problems because I don't want to go the wrong way.
10x
Hello guys.
Just want to know if there is a way to detect how many times a user has clicked a button by using Jquery.
My main application has a button that can add input fields depend on the users. He/She can adds as many input fields as they need. When they submit the form, The add page will add the data to my database. My current idea is to create a hidden input field and set the value to zero. Every time a user clicks the button, jquery would update the attribute of the hidden input field value. Then the "add page" can detect the loop time. See the example below.
I just want to know if there are better practices to do this. Thanks for the helps.
main page
<form method='post' action='add.php'>
//omit
<input type="hidden" id="add" name="add" value="0"/>
<input type="button" id="addMatch" value="Add a match"/>
//omit
</form>
jquery
$(document).ready(function(){
var a =0;
$("#addMatch").live('click', function(){
$('#table').append("<input name='match"+a+"Name' />") //the input field will append //as many as the user wants.
a++;
$('#add').attr('name', 'a'); //pass the a value to hidden input field
return false;
});
Add Page
$a=$_POST['a']; //
for($k=0;$k<$a;$k++){
//get all matchName input field
$matchName=$_POST['match'.$k.'Name'];
//insert the match
$updateQuery=mysql_query("INSERT INTO game (team)
values('$matchName')",$connection);
if(!$updateQuery){
DIE('mysql Error:'+mysql_error());
}
I have a form that has a field pulled from the database as a dropdown. I need to get the text selected in the dropdown but I don't know in advance what the field ID will be.
This is basically just a form that has already been generated. I don't need to pull anything from the database, it's already on this page. All I need to do is get the form information and email it, no writing to the database.
I know how to do the _Request for the other fields based on the ID but I'm not sure how to do this one. The ID changes. It can be ID=1, ID-2, etc.
I need to do something like: _REQUEST formelement where ID is LIKE "ID[*]" or something similar.
Any suggestions or links to tutorials?
Here are a couple samples of what the dropdown renders on the page:
<div class="wrapperAttribsOptions">
<h4 class="optionName back"><label class="attribsSelect" for="attrib- 1">Model</label></h4>
<div class="back">
<select name="id[1]" id="attrib-1">
<option value="45">VC3-4C</option>
<option value="1">VC3-4PG</option>
<option value="3">VC3-4SG</option>
<div class="wrapperAttribsOptions">
<h4 class="optionName back"><label class="attribsSelect" for="attrib-14">SPK Model</label></h4>
<div class="back">
<select name="id[14]" id="attrib-14">
<option value="43">SPK-4</option>
<option value="44">SPK-8</option>
</select>
TIA
I want to be able to determine if the web.config element
<compilation defaultLanguage="vb" debug="false" />
if the property is debug is set to true or false.
Public Shared Function isDebug() as Boolean
......
......
......
......
End sub
Thanks
You have an array size n and a constant k (whatever)
You can assume the the array is of int type (although it could be of any type)
Describe an algorithm that finds if there is an element(s) that repeats itself at least n/k times... if there is return one. Do so in linear time (O(n))
The catch: do this algorithm (or even pseudo-code) using constant memory and running over the array only twice
$("div.square").droppable({
accept: '.white',
drop: function (event, ui)
{
$to = "#" + $(this).attr('id');
alert(to);
$.post(
"/Game/AddMove",
{
from: $from,
to: $to,
GameID: $("#gameID").val()
});
}
});
Well it's nor working. So I must ask, is it possible to call AJAX on droping some UI element ?
The problem is, it's not even calling an controller,
Without any extension library, is it possible to have multiple layers in the same canvas element?
So if I do a clearRect on the top layer, it will not erase the bottom one?
Thanks.
hi, I am getting this exception
Could not find schema information for the element 'class'
on line
Line 13: Predictive.DALUtility.Global.Configuration.AddAssembly("ReleaseDAL");
What can be the possible cause?
Thanks
var phoneBookTableValue = [];
phoneBookTableValue.push({ "key":"1", "value":["3396,Accounting ,CCH,,,,","1"]});
phoneBookTableValue.push({ "key":"2", "value":["3284,Acute Care ,CCH,,,,","2"]});
phoneBookTableValue.push({ "key":"3", "value":["3265,Acute'Care East ,CCH,,,,","3"]});
When running the javascript file I get the error "missing ] after element list. Can U help me? PLZ!
Hello all,
My question is quite simple,
I created a DIV, with a HyperLink control in it.
As following:
I created an 'onclick' event in jQuery for the DIV as well:
$('#divOne').click(function() {
alert('You clicked on the DIV element');
});
My goal is to trigger this event when the DIV area is clicked (working fine), BUT-
When the HyperLink is clicked, I need the page to redirect WITHOUT triggering the DIV 'onclick' event (can use JavaScript or jQuery as needed).
Thanks all!
Sir,
I apologize if this is already covered somewhere. I did a search and find something which I have already implemented.
I am developing an application which receives data from a device connected via serialport. I am using SerialPort datareceived event to capture data. I am to display data in text boxes of the main form. Data is received frequently. I used Timer to send command to the device, in response device send some data. Timer interval is 100 ms. In every 100 ms interval some command is sent and correspondingly data is received. I used Invoke function to update the GUI elements like TExtbox, labels etc. Everything is fine. All the elements are updating beautifully. But during receiving data if I make any change in main form like moving form, minimizing, maximizing, or clicking somewhere in the form, then data receiving stops. I couldnot find the reason why its happening ? I also changed the timer interval to 200,300,400,500 but same problem is there.
Please tell me why its happening? And possible solution...
Thanks In advance.... :)
Hi,
I have a class
Class MyObject
{
decimal v1;
decimal dv1;
decimal v2;
decimal dv2;
}
and a
List<MyObject> ...
I need to process every element of the list by adding dv1 to v1 and dv2 to v2
Something like (pseudo-syntax):
myList.Transform(o=>o.v1+=o.dv1, o.v2+=o.dv2)
How can I do this (obvious my pseudo-syntax doesn't works)?
Thank you
In Oracle, you can write:
update t
set xml = updateXML(xml, '/a/b/text()', 'gaga')
This works only if you already have some text in the <b> element. How to update the document and "add some text" in <b> if the document in the database looks like:
<a>
<b/>
</a>
I am attempting to locate the nth element of a List in Prolog. Here is the code I am attempting to use:
Cells = [OK, _, _, _, _, _] .
...
next_safe(_) :-
facing(CurrentDirection),
delta(CurrentDirection, Delta),
in_cell(OldLoc),
NewLoc is OldLoc + Delta,
nth1(NewLoc, Cells, SafetyIdentifier),
SafetyIdentifier = OK .
Basically, I am trying to check to see if a given cell is "OK" to move into. Am I missing something?
hello!
i'm looking for a proper way of placing popup div-elemnt in the center of current view area.
for example: we have some div element with {display:none; position:absolute} and few buttons, one on the top of document, second in the center and last one, somewhere in the bottom. By clicking on any of this button, div should appear in the center of current viewing area
$(".btnClass").click(function(){
//some actions for positioning here
$(div_id).show()
})
here how it's goes:
You have an array size n and a constant k (whatever)
you can assume the the array of int type tho it kind be of whatever type but just for the clearane let assume it's an integer.
Describe an algorithm that finds if there is an element/s that repeat itself at least n/k times... if there is return one - do it in linear time running O(n)
Imortent:
now the catch do this algorithm or even pseuo-code using a constant usage of memory and running over the array only TWICE!!!
My google fu is weak today, but I cannot find a good article to do so. I would like to extend the Zend Adapter to check n extra columns on my database table. What is the best way to fully extend the adapter, so I can use it in the future without needing to dig through documentation again.
Hey there,
I have the following markup: http://www.webdevout.net/test?011
As you can see, the "li" element is overlapping the rounded borders defined for the box.
Is there a way to prevent this apart from applying the corner directly to the last "li"?
Thanks