Effectivily I have a web page text box that I want it to load the value that it outputed when going to a link.
I have a link called www.mydomin.com/number.html
This page just displays a number (lets say it displays 1234).
I then have a another page called show.html.
this page just has a basic html text box.
I want this basic html text box to display the output number at www.mydomin.com/number.html
so this text box should in theory display 1234
I have tried value="www.mydomin.com/number.html" but that just shows the actual link.
Any ideas? Greatly appreciated.
You can always use jQuery AJAX requests if needed (although I agree fully with #Madara's first comment):
$.get("number.html",function(data){
$("#myinput").attr("value", data);
}
Related
Making a simple app script that puts images and Text into a Google Doc separated by 2 Columns, for whatever reason, no matter the way I try it the images are always above the text (Inline) in the Doc, even though they should be layered (Inline),
//Replace QR Code
let qrText = editLocalBody.findText("{{qrCode}}");
let setImagePlace = qrText.getElement().asText().replaceText("{{qrCode}}", "");
let qrCodeImage = setImagePlace.getParent().asParagraph().insertInlineImage(0, qrCodeBlob);
From what I've seen this should insert an image wherever the text was previously located, but when it runs this it's always in the wrong spot, somehow above the text it was suppost to be in!
//Edit - To Show The Progression Of What Is Suppose To Happen And What Actually Happens:
I'm making QR Code badges for a propriety system that runs integrated tightly with Google, so I'm using appscript to get an entry from a google form containing an amount of badges (With relevent data) and autofill a Google Doc Accordingly.
// Loop Start
I fill my template with a text line that has key words in it I can select and replace later, with a keyword it can use to insert another this (This Part Works)
I first edit (findText("{{qrCode}}");) the QR Code, replacing (.replaceText) the keyword for it to nothing ("")
I then get the parent of the piece of code I ran above, which is a block of text (I think all the text in the Doc, I think this is where the issue lies, it puts it above the text because it's just one 'paragraph' or not multiple 'bodies' of text, if I could separate this I think it would work!) As a paragraph, and insert An Inline Image at Child Index (0, of the image ,qrCodeBlob)
I've debugged this script quite a bit, so I know It's that final line that inserting images fails, it sees all the text as 'one'.
// I want this (In Descending Order, each it's own full line):
Image
Text
Image
Text
//What It Gives Me (In Descending Order, each it's own full line):
Image
Image
Text
Text
let qrCodeImage = setImagePlace.getParent().asParagraph().insertInlineImage(0, qrCodeBlob);
I search the documentation but I didn't know exactly how to call that.
I have a template Index2Name that return a name based on an index.
I'm trying to use that name in a link:
[[Articles/{{Index2Name|0001}}|{{Index2Name|0001}}]]
or
Image:Big-0001.png|link=Articles/{{Index2Name|0001}}|''{{Index2Name|0001}}''
In the last example, the name is printed but the link doesn't work. (In gallery element)
It doesn't work. The value from the template is printed but it is not converted to a link.
How can I make this works? And does this have a name? (For future reference)
EDIT: Index2Name is a simple switch returning a few words depending of the id. Since I'm using subpages I only want the name to appear (Example: MyArticle) but the link is Articles/MyArticle
Could you clarify exactly what you want to happen please. (Where you want to link and how you want it to look).
But for example if you use:
[[Image:Big-0001.png|''{{Index2Name|0001}}'']]
It will link to the page Image:Big-0001.png with the link text being the output of:
''{{Index2Name|0001}}''
Or if you use:
[[Image:Big-001.jpg|link=Articles/{{Index2Name|0001}}]]
The image, when clicked, will redirect you to the output of:
{{Index2Name|0001}}
I'm creating a blog application similar to scoopwhoop or mensxp.
Basically I want to create my database in such a way that I can assign image a particular position in the article.
look at this page https://www.scoopwhoop.com/Move-Over-Tony-Stark-Marvels-New-Iron-Man-Is-A-15YearOld-Black-Girl/
or http://www.mensxp.com/health/weight-loss/31372-5-rules-of-fat-loss-that-most-people-ignore.html
you see, in these pages we have some text then a relevant image then again some text and relevant image to just above text and so on.
I mean it should make sense that a particular image comes just before or after the related text.
Currently I'm doing this way
class Post(TimeStamp):
title = models.CharField(max_length=127)
text = models.TextField(verbose_name='full text description')
# some more fields
class Pictures(TimeStamp):
image = models.ImageField(upload_to=upload_to_image_path)
post = models.ForeignKey(Post, related_name="picture")
this schema will create two tables one for blog post and other of images used in posts.
now here I can randomly put images in a post... like count no of words in a post and number of images associated with this post and then use basic math to divide the text in equal length and put images after every blog in frontend. but it wont solve the problem.
I tried to use django_summernote as well but created some other problems so discarded that option.
How do you think I should design my schema so that I can solve this problem and may be i should be able to use django admin smoothly.
I would throw out the Pictures() class altogether. The images should be a part of your post body. So an example entry would be...
title = "How to program an awesome site with Django!"
text = "<p>This is some text.</p><img src='image link'><p>This is some text after the image</p>"
Basically, the images are just as much a part of the post body as the text. There is no need to create a separate database table.
So in summary, this should be your database setup...
class Post(TimeStamp):
title = models.CharField(max_length=127)
text = models.TextField(verbose_name='full text description')
# some more fields
And the post body as a whole should all be contained within the text field.
I use Gxt-2.2.5-Rtl (http://code.google.com/p/gxt-rtl/) and try to show html content through HtmlContainer's setUrl() method. But unfortunately the result is flipped version of my expected output. For example suppose our input html contains a table which starts columns from right to left as id, name, description. So what we get is a table that their column starts from expected order BUT FROM LEFT TO RIGHT!
I used Gxt's Html and Gwt's HTML and HtmlPanel classes, but this problem doesn't solve.
In addition I should say when I use TabItem or ContentPanel's setUrl() method this problem disappears. But I prefer to don't use that method and because:
1- Just last loaded iFrame is visible at a time. This means that navigating through other preloaded tab items displays a blank page.
2- Poor control over loaded page through GWT, like catching click events and etc.
Expected output:
http://www.freeimagehosting.net/yow6l
Wrong output:
http://www.freeimagehosting.net/8opdt
I changed the titles to English for better communicating! :)
Thanks!
I am working on an asp page that verifies information in a text box after the user types it in.
A “product number” is manually entered (free form). Using the after update event, I have the page post the data and lookup the product number to determine if it is valid. If not valid an error message is posted in the box, otherwise the product number and description is placed in the box (I.E X1234 becomes X1234 – RED YO-YO). This works 100% fine. My problem is that after the update the focus is lost on all the data entry items. I want the focus to be returned to the next text box so the operator can type in the next piece of needed information.
Note: So far I inserted a function that dynamically changes the “TABSTOP” numbering such that the “next” box is assigned the #1 after the validation lookup. This works on my browser (Firefox 3.05) but is does not on my IE (Thanks Bill ! ). In IE when the posting is finished the focus for some reason ends up on the “enter the URL” and hitting tab puts the focus on some control button that is no where near where I want it to be.
If you are trying to do what I think you are, this should do it.
In your ASPX page:
<script type="text/javascript">
function focusControl(ctrlId) {
document.getElementById(ctrlId).focus();
}
</script>
In your code-behind:
// 'ctrl' is the name of the ASP.NET TextBox that you want to receive
// focus on load.
Page.ClientScript.RegisterStartupScript(
typeof(Page),
"Focuser",
"focusControl('" + ctrl.ClientID + "');",
true);
Here is the general solution:
http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html