Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently May 17th, 2024, 9:47 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Code not working to load an image and display it in a field
PostPosted: August 25th, 2015, 3:44 am 
Offline

Joined: August 24th, 2015, 8:42 pm
Posts: 42
Location: Wesley Chapel, FL, USA
Opus: Opus Pro 9.x
OS: Windows 10
System: MSI Dragon Laptop - 8 Core i7, 32gb ram, 2tb hd, GeForce GTX 980
I have the following code in opus script:

Quote:
var memberpic = document.getElementById("fileBrowse");
imgMemberpic.setimge(memberpic);


It does not work in preview mode. I should mention that this is using the DEMO version. I did buy Opus pro but am waiting for the serial code/activation.

That script is attached to a button marked BROWSE using a opus script programming action on left-click. memberpic is the variable to store the picture in (or the path to the picture - not sure how to do this so that it later gets stored in a MySQL database).

I need to store an image (image path?) in the variable memberpic for inclusion as a blob in a database.

I would also like to show the selected image in a picture box (on the same form) called imgMemberpic

How would I do this in Opus Pro?

Thank you.

Mike

_________________
You Dream It - We Create It
www.supersynths.com - Amazing Synths and Sounds


For this message karmacomposer has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Code not working to load an image and display it in a fi
PostPosted: August 26th, 2015, 11:04 pm 
Offline

Joined: August 24th, 2015, 8:42 pm
Posts: 42
Location: Wesley Chapel, FL, USA
Opus: Opus Pro 9.x
OS: Windows 10
System: MSI Dragon Laptop - 8 Core i7, 32gb ram, 2tb hd, GeForce GTX 980
Anyone?

Mike

_________________
You Dream It - We Create It
www.supersynths.com - Amazing Synths and Sounds


For this message karmacomposer has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Code not working to load an image and display it in a fi
PostPosted: August 27th, 2015, 12:58 pm 
Offline

Joined: August 21st, 2012, 5:36 pm
Posts: 20
Location: Portugal
Opus: OPUS PRO v9.6
OS: Windows 8 x64
I think this can help!


You do not have the required permissions to view the files attached to this post.


For this message JATBorges has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Code not working to load an image and display it in a fi
PostPosted: August 27th, 2015, 1:30 pm 
Offline

Joined: August 24th, 2015, 8:42 pm
Posts: 42
Location: Wesley Chapel, FL, USA
Opus: Opus Pro 9.x
OS: Windows 10
System: MSI Dragon Laptop - 8 Core i7, 32gb ram, 2tb hd, GeForce GTX 980
Thank you. I will look at this and integrate it. I'll ask more questions if it does not work for me.

Mike

_________________
You Dream It - We Create It
www.supersynths.com - Amazing Synths and Sounds


For this message karmacomposer has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Code not working to load an image and display it in a fi
PostPosted: August 27th, 2015, 3:06 pm 
Offline

Joined: August 24th, 2015, 8:42 pm
Posts: 42
Location: Wesley Chapel, FL, USA
Opus: Opus Pro 9.x
OS: Windows 10
System: MSI Dragon Laptop - 8 Core i7, 32gb ram, 2tb hd, GeForce GTX 980
This looks perfect. I may ask for help on the post because the database record is HUGE and comprises over 25 fields, including not one image blob, but 4.

Thank you so much. This will get me 99% there.

I also may ask for help on creating a reading interface for the members (this is a member directory) where people can peruse and search through the database
in a user friendly way (search, back and forth buttons and a drop down for names and type of business).

Mike

_________________
You Dream It - We Create It
www.supersynths.com - Amazing Synths and Sounds


For this message karmacomposer has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Code not working to load an image and display it in a fi
PostPosted: September 1st, 2015, 8:43 pm 
Offline

Joined: August 24th, 2015, 8:42 pm
Posts: 42
Location: Wesley Chapel, FL, USA
Opus: Opus Pro 9.x
OS: Windows 10
System: MSI Dragon Laptop - 8 Core i7, 32gb ram, 2tb hd, GeForce GTX 980
@JATBorges:

Everything is working great, except for posting images. The text inputs all work and the file browser lets me pick the image (a jpg in this case) and everything
posts to the database correctly except the images. In PhpMyAdmin, picture blobs seem to be in bytes instead of kb and when clicked on, they are binary files
and cannot be viewed.

A previous manually input record (not from the Opus Pro form) has images and when clicked, they show as .jpg and can be viewed.

I am posting the image path and the image shows nicely in a picture box (when I use the image path as the source).\

Here is a comparison between one I manually entered directly into PhpMyAdmin. The file uploaded was a small 22.6kb .jpg file (notice it says jpg image):

Image

Here is one uploaded with the Opus Pro created web page with php script. The picture uploaded was the same as above, a simple, web friendly .jpg image at 22.6kb (notice it just says binary file and not jpg):

Image

So, what am I doing wrong?

Is there anything in the following MySQL image tutorial that can help?

http://talkerscode.com/webtricks/upload ... 0MySQL.php

Mike

_________________
You Dream It - We Create It
www.supersynths.com - Amazing Synths and Sounds


For this message karmacomposer has been thanked by : mackavi


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group