so I'm running a Runescape Private Server and my java code for voting in it is if the link = www.clearpkz.webs.com/votevote?Username= + username entered is active, then it allows users to do ::claim to get a reward. But how can I make it so the Submit button to enter their username only displays if they click on every image first? Or can I only make it display once every 24 hours even if the page is refreshed?
Here is my current code:
http://pastebin.com/rfQeVkfT
Here is my voting website: www.clearpkz.webs.com/vote
You must disable with jQuery a submit function and check if user clicked on image then you can enable a button for submit.
Also:
1. If you show page> $("input[type=submit]").attr("disabled", "disabled");
2. You need one variable for click test. if user clicked on image COUNTER++
3. If COUNTER > 0 then $("input[type=submit]").removeAttr("disabled");
Related
In CakePHP 3, I am having troubles with "breaks" in ajax requests. The specific page is reload (if needed) by ajax requests, called every 5 seconds. The page is correctly refreshed.
The problem appears if a logged user (to his own account) clicks a "delete" button on a selected element. If the button uses javascript "onclick confirm" and the user waits more than 5 seconds before he clicks "OK" as a confirmation, he is completely logged out from his account.
echo $this->Html->link($this->Html->image("../img/btn/btn_usun.png"),
array('controller'=>'offers','action'=>'delete/'.$this->Encrypt->encryptID($id_rekordu)),
array('escape'=>false,'onclick'=>'return confirm(\''.__d('offer','Czy usunac oferte',true).'\');',
'title'=>__d('default','Usun',true))
);
If the button does not have the "onclick confirm" - the element is deleted, page is refreshed and it works correctly
echo $this->Html->link($this->Html->image("../img/btn/btn_usun.png"),
array('controller'=>'offers','action'=>'delete/'.$this->Encrypt->encryptID($id_rekordu))
);
What can be a solution to use both the ajax refresh at the background, and "onclick confirm" before deleting, and do not logout the user if he is slow to click "OK" in the confirmation?
Seem like you need to intersect while waiting before user click OK on confirmation popup. I believe that default jquery confirmation may not intersect while popup showing unless you use another library. I would like to recommend the following library. Basically if popup is showing on screen, you can intersect like clearInterval or reset interval after you click confirm. Hope this help for you.
https://craftpip.github.io/jquery-confirm/#callbacks
I have a checkbox and a ok button on a webpage,
steps to be performed using Watin Automation:
click checkbox
click ok button
expected result : A row gets added to concerned checkbox on next page
Actual Result with Manual execution : A row gets added on next page.
Actual Result with Watin Automation : No row is added on next page. Even after checkbox is checked.
I have used following code to check the checkbox
browser.Frame(Find.ByTitle("Frametitle")).CheckBox(Find.ById("CheckboxId")).Click();
Thread.Sleep(1000);
if (!browser.Frame(Find.ByTitle("Frametitle")).CheckBox(Find.ById("CheckboxId")).Checked)
{
Console.WriteLine("Checkbox is not checked, checking it once again");
}
Also I have used javascript to check the checkbox and clicked the button, but still it is not working
Javascript code is as follow:
browser.RunScript("document.getElementById('CheckboxId').click();", "javascript");
Please help me to resolve this issue.
Thanks,
Saurabh
Try to focus on the element and send ENTER key and check.
When a user double clicks on a row on my page, I navigate them to an edit screen which shows them some important information. When they submit that patient I gerimander jqGrid to take them page to the page that they were just viewing...
serializeGridData: function (postData) {
//debugger;
var pagInfo = $(this).se
debugger;
if ((rowFromTemp != "") && (pageFromTemp != "")) {
//debugger;
postData.page = pageFromTemp;
pageFromTemp = "";
rowFromTemp = "";
}
return postData;
},
I basically edited the postData in the serializeGridData function.
My question is, when I navigate to a different page lets say page 3 of 10 after I have edited information and returned to the correct page, when I click refresh of the whole page...
I want the user to return to the page that they just navigated to. Right now, it will return them back to the page that they initially returned from after editing information. So If I were to construct a timeline of events...
1) user see's paged information...
2) user selects row to edit
3) user navigates to edit page and does his thing then submits
4) user now is sent back to page where he came from...
5) user goes to a different page (either next or last)
6) user refreshes page
7) !! user is sent to page X from step 3 and 4 and Not 5 !!
I was hoping to to some kind of refresh of page event and set the correct page in there.
Is my methodology or thinking in correct here? Is there a way to ensure that the correct page is selected no matter what?
I just checked again. It would seem that if a user
1) navigates to page X
3) refreshes a page
he will be sent to page 1.
Maybe I am setting an unrealistic expectation. Maybe if they reload the whole page, they should expect to go back to page 1.
Well even so, how could I accomplish that task with the first workflow
In my opinion the real problem which you have is the usage of step 3: "user navigates to edit page and does his thing then submits". The step makes all the problems which you try to solve. Instead of going to another page one can create dynamically some controls which allows to edit the selected row. jqGrid provide inline editing or form editing for the purpose. You need just include editable: true property in the columns which you need to edit implement starting of inline/form editing on select of row or on double click. Alternatively you can use buttons from the navigator bar (see navGrid and inlineNav) or in addition column of the grid (see formatter: "actions").
If you still don't want to use any editing mode which provide jqGrid you can just place the whole content of the body of the main page inside of a div. You can hide the div using jQuery.hide instead of redirection to "edit page". You can load the content of "edit page" on the same main page (per jQuery.load for example). Then you can remove the loaded "edit page" and show the original main page. As the result the main page will be shown in exactly the same form as it was before starting of editing.
I have an text field in an oracle apex form. A user can type in a search query and hit the "Search" button to submit the page. I also want to allow the user to just be able to hit the enter key to search.
On the text field I have the option "Submit when Enter Pressed" set to Yes. However this is not working. I think it is because I have other processes attached to other buttons on the page that are used to also submit the form for other purposes.
My question is, is there anyway to define specifically what process gets called when enter is pressed from a specific text field?
When you submit a page by pressing Enter in an item with "Submit when Enter pressed" set to Yes, the page is submitted with the Request value set to the name of the item. You can therefore make the process conditional on the value of Request being the item name.
this is supposed to be simple
i have two pages A and B what i want to do is add a button (a hyperlink or image will do) in page A that when clicked go to page B
how can i do that ?
thanks
If you don't want a button, simply use a html href to f?p=&APP_ID.:<your page number to link to>:&SESSION.
Go to page 2! takes you to your page number 2...
There are many ways. Perhaps the simplest is to create an Apex button using the Create Button wizard. Follow the instructions and when you get to the "Action When Clicked" page, choose "Redirect to Page in this Application" as the Action and enter the Page number you want to go to when the button is clicked. You can also enter other details such as Request, Clear Cache, Set These Items.