It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am new yii framework .Plz help me for how to disable submit button after submission in Yii framework. plz explain in view, controller, and model for this work
Basicaly Yii comes with jQuery as client side library so you should use a jQuery selector to select your button and disable it. If you are having trouble selecting it you should add an ID to it.
<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save' ,array('id'=>'my_id')); ?>
after that you could use jQuery to disable the button
$('#my_id').attr("disabled", true);
you should place that code in the same view (all client side code should go in views) in a jQuery document ready function.
Like stated, this isn't really a yii related question.
Related
This question already has an answer here:
Switch Page Karate UI issue
(1 answer)
Closed 1 year ago.
I have a scenario in which after I click on link a new page is opened and then I need to work on the new page which is loaded.
Using switchPage I'm able to navigate to that page but it is not identifying the element on new page whereas it is searching for the element in the first page which is opened.
I'm not able to find a way to solve this problem. Can someone please help?
Scenario: Title of your scenario
Given driver baseUrl
And waitFor("input[name='username']")
And input("input[name='username']",username)
And input("input[type='password']",password)
When click("input[name='Login']")
And waitFor("a[title='Setup']")
When click("a[title='Setup']")
* delay(2000)
When switchPage(1)
And waitFor("input[class='filter-box input']")
It is possible we have a regression in 1.0.1 - see this: https://github.com/intuit/karate/issues/1606
The most helpful thing you can do is to follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue (ideally contribute code)
Alse see this answer: https://stackoverflow.com/a/63706655/143475
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I'm trying to play around with elements on Reddit but after searching I am unable to select the 'View More' element. I don't have much experience working with the framework and I thought I understood Xpaths but I am unable to figure out where I'm going wrong
I am revising Xpaths right now and will post if I find a solution myself.
Here's an image to hopefully make things clearer:
Here are the paths I have tried:
driver.FindElement(By.XPath(".//class='s13lw6dy-6 cOyQoR']//*[text()='View more']")).Click();
I am using the following imports:
using OpenQA.Selenium;
using OpenQA.Selenium.Support;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Interactions;
If you right-click the HTML element and click 'Inspect,' you can get an Xpath for that element in the page. You should be able use that in your selenium code, if it isn't dynamic (doesn't change from one page load to another).
xpath = "//*[#id="SHORTCUT_FOCUSABLE_DIV"]/div[2]/div/div/div/div[2]/div[3]/div[1]/div[2]/div/a"
button = find_element_by_xpath(xpath)
# another possible xpath:
# button = find_element_by_xpath("//a[contains(text(),'View more')]")
button.click()
i want to disable update button dan make it invisible using jQuery when update page is open, but if the value of payed is 1. i can get the value from database
somebody please help me, i'm a newbie in yii. thank you
Add this code to your view file:
<?php Yii::app()->clientScript->registerScript(
'disable-button',
'$('input[type="submit"]').attr('disabled','disabled');',
CClientScript::POS_READY
) ?>
But change jQuery selector on yours:
$('input[type="submit"]')
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am able to successfully parse the items (title, link, description, creator, pubDate and Cdata image) from RSS feed. Here is where I am stuck. I want to implement "Load More" option so that when a user scrolls down the tableview, he will either click on a button to or just scroll more to reveal more tableview cells.
What I want is the parser to parse 10 items at a time and on clicking load more, it should parse and load 10 more items.
Last, is there any way I can format the RSS feed to show 10 items on first page and 10 on next and so on.
Create RSS feed like below.
http://www.example.com/rssfeed.php?page=1
http://www.example.com/rssfeed.php?page=2
http://www.example.com/rssfeed.php?page=3
so that you can send page as parameter and can get results based on page number, send only 10 items per page.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
What is the best way to display users on Google maps? I need to display the avatar image (25x25px) and user name with clickable link to profile.
I keep searching in the api documentation but the markers and overlay options confuse me, what feature/option should I use?
Thank you.
The solution is MarkerImage. This link will help you.
var latlng = new google.maps.LatLng(lat, lng);
var marker = new google.maps.Marker({
icon: new google.maps.MarkerImage('avatar.png', null, null, new google.maps.Point(13, 25)), // 13 stands for centering
position: latlng
});
So as Jill-Jênn Vie said above, the image can be set by MarkerImage;
The user name can be set as a tooltip of that marker/image, it is the "title:" parameter of the marker.
Then to open user profile on click add this event for "marker":
google.maps.event.addListener(marker, 'click', function() {window.location = 'http://google.com'});
I would paste the full code but it is already modified to include many markers defined as array.