This should be another simple fix that is confusing me. I'm pulling data from a database and rendering a button for each row of the database. However, the text doesn't appear inside the button! It appears underneath it!
Here's the code:
$('#'+category).append('<li><a href="#itemColours" data-role="button" data-icon="false" data-rel="popup" data-mini="true" id="'+thisRow.fixture+'itemColour" class="descriptions" onClick="getItemColours(\''+thisRow.fixture+'\')" />'+thisRow.colour+'</a></li>');
Interestingly, when the getItemColours function runs, it shows a popup of colours and when you select one it changes the button and updates the database. That bit works just fine.
$('#'+item+'itemColour .ui-btn-text').text(colour);
here's what I get: http://i1320.photobucket.com/albums/u521/dan_jones2/buttons_zps185113ce.png
The button rendered incorrectly, the button after the function call (correct) and then the button after the list is refreshed (incorrect again).
This button is working just fine in my jsFiddle example. I think this is a problem in your custom css, and it is interfering with jQM button css.
What about your class descriptions, maybe it is causing this problem. Or maybe you have a css that interferes with
<span class="ui-btn-text">....
Probably best thing you can do is to use for example firebug addon for Firefox or Chrome ann take a look at button HTML and CSS. Specially take care for classes added to:
<span class="ui-btn-text">
I think something gave it display: block; css property and that is causing this problem.
I still don't know why this wasn't working but I got around it by changing the anchor tag for an input button and added another function to open the popup.
Related
I'm writing a Python script to enter MS Teams and join a class based on a schedule, and have very little to no knowledge of markup languages/ js.
This "Join" button is what i want to click.
When i click inspect on it, I get (Highlighted in blue):
My code to click the button:
driver.get(physics)
driver.find_element_by_xpath('//input[#class=""]').click()
need help finding the class/id/ anything to be honest, to click the button.
The rest of my code: code
You can find the details of the button from below the screenshot.
But it is not recommended to use the classes for the same as they might be repetitive on the entire page.
The button is highlighted in the inspector tools.
Note: class root-160 is a dynamic class and you might not wanna use it. It will change per meeting/pages.
Screenshot of button component
I have an ASP button that when clicked brings up a window.confirm. This window.confirm disappears without user interaction. However, if I keep clicking the ASP button, after about the 4th or 5th click the window.confirm box will work as expected.
A couple of things that I also noticed, after hours of working on it, if I remove the Text property from the ASP button, the window.confirm works as it should.
This made me think, "Hmmmm... let me look at the <input> button that is behind the scenes of the ASP button, and I noticed that if I remove the value from the input the window.confirm works, but if I put a value in the input, the window.confirm stops working again.
Does anyone know what may cause this? Is there a work around to putting text in the button without using the Text property? I haven't tried innerHTML yet because I wanted to see if there is anything else I can do before I do that.
Btw, I tried using OnClientClick, instead of OnClick and I get the same results.
Here is the code that I have for the button:
<asp:Button ID="btSubmit" runat="server" Text ="Submit Email" OnClick="btSubmit_Click" OnClientClick="return confirm('Test');"/>
I've just faced the same issue.
As investigating the problem I've found out that the code itself is ok, but after puting it in the context of the website - starts failing as described above.
The problem seems to be the facebook tracking code called through GTM.
If I remove the whole Google Tag manager code from the header - everything just works fine
Although it's not the sollution yet, so I'll need some deeper GTM investigation to prevent this behaviour. But this also might help you...
I'm up to upgrade my "wysiwyg" editor by adding new buttons to the toolbar. One of these buttons is called "add a slideshow" which works this way :
when I click the button, it shows up a popup window which tells me to add pictures that are gonna be in the slideshow.
then when I choose the pictures, a simple slideshow will be created and shown in the editor.
I made some research in the net and I found an enormous number of slideshow codes that each time when you wanna change the slide, you have to go to html code and change the attribute's value ... So instead of that, I just wanna make it easier to the user by doing this "popup window + automatic add of the pic to the slideshow"
If anyone of you guys have an idea about this, please help me to achieve this work.
PS: Sorry for my poor English :p
The unfortunate thing about wysiwyg text editors is, while some have options, usually what you see is what you get.
I am opening a pop up screen on anchor tag I don't know why it is not open. I used many time this line to open the pop up. It always open. But this time it is not when I inspect it show 'display none' with no content.
I follow the steps
Press add button (generate row)
Click icon on the row (right side). Show pop up screen with edit and delete option.
Press edit. It should show pop up screen, but it is not showing...
http://jsfiddle.net/4ajeB/11/
$('.edit_h').click(function(){
alert("edit ID:"+$(this).data('originalId'));
$("#editTestCaseId").popup("open");
})
This may not be a solution, but it is certainly a workaround.
After tracing the CSS and finding that jQuery was probably just being too greedy with its class adding/removing logic, I decided to try the popup("open", ...) call manually using the console. As it turns out, it works fine when done that way. I tried putting the call in the code in different places and in multiples to no avail. As it turns out, other people have run into the same problem. The workaround posted here seems to do the trick:
setTimeout(function () {
$("#editTestCaseId").popup("open");
}, 100);
Why this has to be done? I have no idea.
JSFiddle: http://jsfiddle.net/4ajeB/12/
I am trying to make an on/off toggle button using a checkbox input type and using CSS to change the style to have it look like the ones the iPhone uses for my webapp. Currently my button works great in all browsers however when I load it up on my iPhone it doesn't work, when you click the button nothing happens. At first I thought it might be a problem with my jQTouch or javascript but I removed all my CSS so I could just test the functionality and it worked fine. So I know the problem is somewhere in my CSS. Any idea why this CSS code doesn't allow me to click the button. (The graphics and everything work and look fine, just nothing happens when I click the button). Any ideas? Thanks.
Code is in this fiddle:
http://jsfiddle.net/4gjZX/4/
change to onclick
add an empty onclick to the label - known issue on iDevices
DEMO
However why have inline event handlers when you use jQuery anyway???
Also why the data- in the ID, it is normally used for attribute names
You may get it works by making some css changes:-
label { cursor: pointer; }