|
If the certain font is just for a title or a small part of your text, you could use an image instead...
|
|
|
|
|
The site is only going to be used inside the company, so no worries about unwanted stuff to be downloaded,
The font I need is for a barcode and its nog going to be the same all the time, its for label printing.
I know the easiest way of making sure its on the client side is to manually installing the font where the app is going to be used, but its not allways going to be guaranteed the user will be on the same pc, so in that case if the font is not dedected it must be placed in the Windows/fonts directory
|
|
|
|
|
I found some script to do it but it only works on server side
Dim objStream
objStream = CreateObject("ADODB.Stream")
objStream.Type = 1 ' adTypeBinary
objStream.Open("URL=http://10.52.223.67/PPE/Font/FRE3OF9X.ttf")
objStream.SaveToFile("C:\Temp\FRE3OF9X.ttf", 2) ' adSaveCreateOverWrite
objStream.Close()
objStream = Nothing
Const FONTS = &H14&
Dim objShell
Dim objFolder
objShell = CreateObject("Shell.Application")
objFolder = objShell.Namespace(FONTS)
objFolder.CopyHere("C:\Temp\FRE3OF9X.ttf")
on the client side I get the following error
System.Runtime.InteropServices.COMException: Write to file failed
[COMException (0x800a0bbc): Write to file failed.]
|
|
|
|
|
THIS IS THE WRONG WAY WHAT YOU WANT TO DO
in this case this link will help you, you need to create EOT file
Procedure to prepare Dynamic Fonts ( EOT) -
Before creating these files keep following points in your mind -
1.Install the desired font on your local machine first.
2.Keep the file name same as your font name.
3.Do not use multiple hindi fonts while authoring.
http://webservices.nic.in/wsmad/ResourceCentre/hindiweb.aspx
|
|
|
|
|
Thank you , I'll look into it, got fed up with all the security restrictions, made a exe to install all the fonts , gave the user only the option of running the app and not downloading it,
used this tag to modify the download dialog
|
|
|
|
|
|
hi,
i'm trying to hide/show content of i-frame, id of all section that i wabt to hid/show is same so it hide/show only first occurance of id, code goes like this:
function hidediv(){
document.getElementById('hideshow').style.visibility = "visible";
}
function showdiv(doc) {
document.getElementById('hideshow').style.visibility = "hidden";
}
function displyXML()
{
var div = document.getElementById("myframe");
var doc = div.contentDocument;
if (doc == undefined || doc == null)
doc = div.contentWindow.document;
doc.open();
doc.write("<script src=\"js/scripts.js\" type=\"text/javascript\" language=\"javascript\"> </script>");
for (i=0;i<title.length;i++)
{
// reading data from XML to display in i-frame
strMsg =title[i].childNodes[0].nodeValue;
strUrl = (link[i].childNodes[0].nodeValue);
txt=description[i].childNodes[0].nodeValue;
doc.write("<a href="+strUrl+">+strMsg+</a>");
doc.write("<a href='javascript:showdiv()'> expand </a>");
doc.write("<a href='javascript:hidediv()'> collapes </a>;");
doc.write(" <p id='hideshow' > ");
doc.write(txt+"</p>"); // text i want to hide n show
doc.write(" <br \>");
}
doc.close();
}
how i can show/hide respective part of i-frame?
thanx.
|
|
|
|
|
The ID attribute of an element must be unique within the scope of a document. If you have multiple elements with the same ID, that is violating the rules of XML/XHTML. If you wish to hide/show multiple sections at once, the simplest solution would be to use jquery and CSS classes to tag each element with a common class, and use JQuery to hide all the ones that match a given CSS selector.
|
|
|
|
|
Hello!
I got a button with this code to reset the page:
javascript:document.aspnetForm.reset();return false;
it works like a charm. Except when the page is reloaded the javascript suddenly doesnt work anymore. Nothing at all happens when I click the button.
Does anyone have an idea why this might be?
|
|
|
|
|
I am just speculating here, but maybe the browser thinks there is nothing to reset if the page has just been loaded? Maybe it keeps of track of whether anything has actually been modified in the form before deciding whether to do anything about a "reset" call.
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Number Two's eyes narrowed and became what are known in the Shouting and Killing People trade as cold slits, the idea presumably being to give your opponent the impression that you have lost your glasses or are having difficulty keeping awake. Why this is frightening is an, as yet, unresolved problem. -- HHGTG
|
|
|
|
|
Thanks for your reply! You´re absolutely right, if I type something after the reload, the new text will be deleted when I click the button, but the old text remains!
I wonder how one should solve this, I wouldn´t want to do a postback just to emtpy a few textboxes.
|
|
|
|
|
I don't know why but I tried this way and it's worked :
<script type="text/javascript">
function resetForm()
{
var tag = document.getElementById("form1").reset();
return false;
}
</script><input type="button" name="button" id="button" value="Button" onclick="resetForm();"/>
|
|
|
|
|
thanks for your reply! I ended up using jquery though.
|
|
|
|
|
you must try once after disable view state every control and all controls are inside form tag
Anshuman Singh
|
|
|
|
|
Hello All:
I send the HTTP request to web Server in my program ,which based on ChtmlView (MFC). and I can get the HTTP response ,the body of response is HTML element. But ,if there are some images in this web page, I think web browser need to download the images from the web server.
I want to know The web browser how to download the images. what is the trigger? When the image is download to temporary file, Is the images URL(like ) need to relocate to temporary file ?
I want to know the whole process HTML by IE or other web browser.
Thank you very much!
Lampa
|
|
|
|
|
Dear All,
In My ASP.NET/ASP web application, I have to generate Read Only or Password Protected excel(.xls)file where end user won't able to do edit in that file.
Please provide me your guidenace and suggestions .
Thanks,
Vivek
|
|
|
|
|
Perhaps someone could tell me what is wrong with this script please. It doesn't work in FireFox.
<asp:Button ID="butAddImg" Text="Image?" runat="server" OnClientClick='return SetViewImg(this,"fuAddImg");' CausesValidation="False" />
<asp:FileUpload ID="fuAddImg" Enabled="false" runat="server" />
<script language="javascript" type="text/javascript">
function FindCont(SourceCont,ContToFind){
var conPf_array = SourceCont.name.split("$");
var countArray = conPf_array.length;
var ContPath = (conPf_array[0] + "$");
for (var i = 1; i <= (countArray - 2); ++i)
{
ContPath = ContPath + (conPf_array[i] + "$");
}
ContPath = ContPath + ContToFind;
return ContPath;
function SetViewImg(controlToEval, fuContName) {
var fuControl = FindCont(controlToEval, fuContName);
if (document.getElementById(fuControl).disabled == true) {
document.getElementById(fuControl).disabled = false;
return false;
}
else {
document.getElementById(fuControl).disabled = true;
return false;
}
}
Thanks in advance.
}
|
|
|
|
|
Ginozzzz wrote: var conPf_array = SourceCont.name.split("$"); //break the name down
always use
document.getElementById(controlname)
|
|
|
|
|
Thanks, but I have to use the 1st function to return the full name for the control, since the controls are within a panel (1 of 7 panels in fact). Each panel has the same control names (except the panel name) for the purpose of smaller file sizes, and it means I can reuse many code behind functions this way.
Therefore, as simple 'document.getElementById(controlname)' doesn't work for me.
This code works perfectly in IE. Any more help please?
|
|
|
|
|
Have you debugged it? That should tell you what is wrong?
only two letters away from being an asset
|
|
|
|
|
I used the built in error console of FF, and it shows that the var fuControl is null, however, I know that fuControl does equal the fully qualified name of the control from using an alert box to show the value of fuControl.
Is this problem not obvious then? Is my JS code okay?
If not, I guess I'd better try and debug another way. Does anyone know of any programs/plug ins to use to debug remotley? As you may/maynot be aware, I am fairly new to JS. I use VWDexpress to debug on a localhost with my asp.net projects, but VWD doesn't support JS very well.
|
|
|
|
|
Ok, I've found the problem myself.
I was using the $ symbol to build a reference the controls in the FindCont function, but I should have used the _ (underscore) symbol. IE seems to recognise it, but FF doesn't.
Anyway, problem solved.
|
|
|
|
|
Hi,
I have a Customer table for which I generated my model and I can edit the data in a "Dynamic Data Entities Web Application" project without effort. My Customer table has a DeliveryType column of type int, but I would like to use an enumeration to control the values that is stored in the column so I extend the partial class as follows:
public enum DeliveryTypes
{
Air = 1,
Ship = 2
}
public partial class Customer
{
public DeliveryTypes DeliveryTypeEnum
{
get
{
return (DeliveryTypes)DeliveryType;
}
set
{
DeliveryType = (int)value;
}
}
}
which allows me to write code like this: MessageBox.Show(customer.DeliveryTypeEnum.ToString()); , perfect!
My prolem however is to get my enumeration to be used in a "Dynamic Data Entities Web Application" when the data is maintained, how do I do it? Its easy enough to hide the column for DeliveryType, but I cannot get the DeliveryTypeEnum column to display
Will I have to write my own control for this?
I would prefer not to have to add another table and then ensure that the table values stay in sync with the enum values etc...
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
I believe you have to decorate the property with a [DataContract] attribute for it to properly serialize.
|
|
|
|
|
I added the [DataContract] attribute to my enumeration and [EnumMember] to each value in the enumeration. Then I added [DataMember] to my property in my partial class to give the following:
[DataContract]
public enum DeliveryTypes
{
[EnumMember]
Air = 1,
[EnumMember]
Ship = 2
}
public partial class Customer
{
[DataMember]
public DeliveryTypes DeliveryTypeEnum
{
get { return (DeliveryTypes)DeliveryType; }
set { DeliveryType = (int)value; }
}
}
But this made no difference to the DynamicData control when I edit the data
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|